DemoProductions / shmup

3 stars 2 forks source link

Level controller class #76

Closed flip40 closed 8 years ago

flip40 commented 8 years ago

Adds initial working version of Level controller class. Requires LinearWaveEnemy to have it's BoundingsTimeout2D disabled so that you can see that it is working (to stop instant enemy destruction, this is something that should be fixed in another issue).

Populates a list of backgrounds, middlegrounds and waves for use in the editor from their respective Resources folder.

Currently defaults to level 0 in the array due to not having the proper outside source to get the level from.

All the editor work was done to allow us to use a list of proper gameobjects for each category without assigning prefabs directly (this causes them to be loaded in memory). Effectively, each list knows of a prefab existing and save's their names as strings. They are then loaded as necessary on the LevelController's Start call. This way we are not loading every single level into memory, but can still have each level's resources defined and ready to be loaded by the LevelController class.