Re: Item.Mass - should this be an abstract property? |
Tue, 14 February 2012 15:28 |
|
ekolis | | | Messages: 51
Registered: May 2006 Location: Cincinnati, OH, USA |
|
|
Funny you came up with GameObject; that's what we called our base class in Star Legacy as well!
At first I was a bit confused by the idea of getting rid of Ship - how would you ever have ships in the game without a Ship class?! But I quickly realized that since Stars! doesn't track damage to individual ships, but instead tracks damage to "ship stacks" similarly to the original Master of Orion, there's no need to instantiate an object for every single ship; all you need to do is keep something like a Dictionary<Design, Tuple<int, int>> to tell you how many ships you have in each stack and how much damage each stack has taken!
One question, though - why does GameObject need a Type property? Can't you tell what an object is by using the built-in GetType method of System.Object, or the "is" operator? Or is this something more detailed than just the CLR-type of the object?
Mr. Flibble says...
Game over, boys!Report message to a moderator
|
|
|