Add a scene manager #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The job of the scene manager is to keep track of everything currently on-screen in our game level.
For example, currently the player spawns bullets and adds them to the stage by referencing the "owner" object. It is a bad pattern for a child object to assume the conditions of it's parent.
Instead a scene manager should be told to spawn the bullet. This way it can keep track of things like how many bullets are in play, and it can re-use bullets rather than having to spawn them each time.
In the future, the scene manager will also be able to track things like how many bad-guys are on-screen, or how many collectable items remain to be collected, etc.
The SceneManager will be a Singleton instance, which is created in Godot by using the "unique instance names" feature.
Complete!