Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Item.Mass - should this be an abstract property?
Re: Item.Mass - should this be an abstract property? Tue, 14 February 2012 15:28 Go to previous messageGo to previous message
ekolis is currently offline ekolis

 
Petty Officer 2nd Class
Stars! Nova developer
Stars! Nova developer

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! Razz

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! Smile

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Production classes - IProductionUnit and derivates
Next Topic: Spam posts
Goto Forum:
  


Current Time: Sun Apr 28 22:42:43 EDT 2024