POV-Ray : Newsgroups : povray.off-topic : Generics annoyance : Re: Generics annoyance Server Time
4 Sep 2024 07:17:47 EDT (-0400)
  Re: Generics annoyance  
From: Darren New
Date: 13 Apr 2010 11:27:04
Message: <4bc48d48$1@news.povray.org>
clipka wrote:
>  From the little I could find ad-hoc on the internet, there seems to be 
> an interface IGameComponent, so probably all you have to do is make sure 
> that all classes you want to store in that thing implement 
> IGameComponent, and use an IGameComponent container.

IGameComponent implements the "Initialize" method.
IDrawable implements the "Draw" method.
IUpdatable implements the "Update" method.
GameComponent inherits IGameComponent, IDrawable, IUpdatable.

There's no way to make a "collection of objects that implement 
IGameComponent, IDrawable, and IUpdatable" as far as I know.

> That's what interfaces are for, after all.

Yeah, and it would have been nice if IGameComponent included most or all of 
the methods that GameComponent implements.

-- 
Darren New, San Diego CA, USA (PST)
   Yes, we're traveling together,
   but to different destinations.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.