From: Red K. <red...@pr...> - 2004-03-07 23:51:42
|
Hi Tamas, I will check the new update at home in the next days and get back to you then... See if you propose new interfaces. > I'm not entirely sure about passive ICarriable; how will the battlescape > engine decide whether a unit can fire with the (per definitionem) > ICarriable item in its hand? IMO it would be logical to have basic usage > types put into all battlescape items, so that one just overloads the > throw(...) for grenades and such, maybe using another class that will > be intantiated during mission loading? ICarriable is just a view or the object, that is called in OOP theory as View Inheritance (from Meyer)... You give different views to the different systems, the carrying system (the one that ICarriable is a member of) do not need/want to know whether the object is a gun, a granade, a corpse or whatever you may think of... For instance, Missiles are carriable stuff too, but cannot be carried by agents because of its heavy weight and size, but they could nonetheless from the Carrying system view (if not where for its properties). So there is no reason to let the carrying system to know anything about what it is being carried. ICarriable is a passive entity, because, for active behaivior you have other views to apply to the object (via inheritance) using its cooresponding interface. Hope that helps to clarify the issue. Greetings Red Knight Simplicity is the key to understanding. |