Get the scene manager in place, have it connect to the GameController.
Use the scenemanager to update the game controller with how many crates are in the scene at any given time.
Example:
func buildLevel()->void:
updateCrates()
func updateCrates()->void:
var _crateTotal =0
if crates:
for obj in crates.get_children():
if obj is Crate:
if not obj.tree_exited.is_connected(updateCrates):
obj.tree_exited.connect(updateCrates)
_crateTotal +=1
game.crateTotal(_crateTotal)
Get the scene manager in place, have it connect to the GameController.
Use the scenemanager to update the game controller with how many crates are in the scene at any given time.
Example:
```
func buildLevel()->void:
updateCrates()
func updateCrates()->void:
var _crateTotal =0
if crates:
for obj in crates.get_children():
if obj is Crate:
if not obj.tree_exited.is_connected(updateCrates):
obj.tree_exited.connect(updateCrates)
_crateTotal +=1
game.crateTotal(_crateTotal)
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Get the scene manager in place, have it connect to the GameController.
Use the scenemanager to update the game controller with how many crates are in the scene at any given time.
Example: