Updated future testing logic.
This commit is contained in:
parent
da9f947788
commit
49a8913c14
3 changed files with 11 additions and 2 deletions
|
|
@ -57,6 +57,13 @@ func _spawn_test_pickups() -> void:
|
|||
|
||||
func pickup_collected() -> void:
|
||||
# Called by the player when a pickup is collected.
|
||||
# Sync WeaponComponent's test_mode so tab cycling stays independent of
|
||||
# pickups when in test mode, and normal behavior is restored otherwise.
|
||||
var level: Node2D = get_parent() as Node2D
|
||||
if level != null:
|
||||
var wc: WeaponComponent = level.get_node_or_null("WeaponComponent")
|
||||
if wc != null:
|
||||
wc.test_mode = test_mode
|
||||
# Decrement counter; resume timer once all pickups are gone.
|
||||
_pickups_remaining = max(0, _pickups_remaining - 1)
|
||||
if _pickups_remaining <= 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue