-
Notifications
You must be signed in to change notification settings - Fork 2
Level System Overview
So we got LevelService
, which has some private variables and public methods
Below is the constructor for the LevelService, which initialise some private variables, and most importantly registers some listeners.
The levelControl()
method called by the startLevel
event currently takes one parameter. All it does for now is limit the number of customers that spawn.
This is in the MainGameScreen
class, at the bottom of the constructor. The first two statements become more relevant in later photos.
This is from the LevelComponent
class. The event startSpawning
, if you remember, is triggered in LevelService
by levelControl()
This is what the event startSpawning
calls. This method basically just ensures that all private variables are reset, but most importantly, enabled spawning through the toggleNowSpawning()
method.
Speaking of, here is the toggleNowSpawning()
method
Now the reason why I use a Component
in the first place is because the Entity
class has a very nice method which is create for asynchronous code which can be called constantly (I didn't know about scheduledEvents
)
And finally, in the create()
method in ForestGameArea
, the event spawnCustomer
is registered (the event triggered during the hijacked update()
method).
And this is what the spawnCustomer()
method looks like, again, in the ForestGameArea
class (it was conveniently already here)
Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes
Entities and Components
Input Handling
Game Screens and Areas
Fire Extinguisher Handler Component
MainGameActions Create Docket Triggers
Main Game Order Button Display
BackstoryCutsceneDisplay Test Plan
Test Plan for MainGameOrderTicketDisplay
Test Plan for MainGameOrderBtnDisplay
Test Plan for DocketLineDisplay
Test plan for RandomComboService
Test plan for SpeedBoostUpgrade
Test plan for DancePartyUpgrade