Create a SceneManager #3

Closed
opened 2026-04-27 20:23:21 +00:00 by OddlyTimbot · 0 comments
Owner

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) ```
OddlyTimbot added the
enhancement
label 2026-04-27 20:26:09 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OddlyTimbot/AprilGameExample#3
No description provided.