PlaceholderGames / Team1-2017

Team 1 CS2S561 game
2 stars 3 forks source link

Variable classes #34

Closed SharktasticA closed 6 years ago

SharktasticA commented 6 years ago

In commit e7189557a8f636cc6fa8b9fe3cda6a79167299d3, I added classes to store variable entities like Health and probe Tiers safely. The classes will be founded with an inheritance structure and will make use of virtual polymorphic functions to cut down on code. Whilst they still need some polish (hence the issue open), I have written a wiki page to show you how to access these variables.

SharktasticA commented 6 years ago

General, Probe and Planetary variable classes are implemented. Note to self : add population support

SharktasticA commented 6 years ago

Update Population support added

SharktasticA commented 6 years ago

Until the need to add more things, this task is pretty much done.

SharktasticA commented 6 years ago

Update 071200801c9abbf9596368b6b6a93b9f1bedff1f I realised ints could not hold the values I needed for the population of Earth. Tried changing to longs, but Unity's inspector doesn't support long! So population itself is a public string for accessing via inspector, but through code should be accessed with long GetPopulation() and void SetPopulation(long). I will work on a proper fix eventually.

SharktasticA commented 6 years ago

Wiki page for variable classes modified to reflect changes.