minor edits.

This commit is contained in:
Adam Burns 2025-11-14 21:49:13 -05:00
parent acb73a8fda
commit dce678adc6
2 changed files with 6 additions and 8 deletions

View File

@ -59,6 +59,12 @@ func _process(_delta: float) -> void:
load_game()
pass
func reset() -> void:
print_debug("Resetting the level")
enemies_dict.clear()
player_current_health = player_stats["starting_health"]
time_available = timers[current_level]
func second_counter() -> void:
time_available -= 1
timer_updated.emit(time_available)
@ -66,12 +72,6 @@ func second_counter() -> void:
print_debug("You ran out of time! Emitting level_changed signal")
level_changed.emit(levels[current_level])
func reset() -> void:
print_debug("Resetting the level")
enemies_dict.clear()
player_current_health = player_stats["starting_health"]
time_available = timers[current_level]
func on_coin_collected(_body, coin) -> void:
print_debug("GC knows coin collected")

View File

@ -20,7 +20,6 @@ func _ready() -> void:
GameController.reset()
build_level()
func _on_world_boundary_body_entered(body: Node2D) -> void:
if body is Player:
var current_scene = get_tree()
@ -30,7 +29,6 @@ func build_level() -> void:
if coins:
update_coins()
var _total_enemies : int = 0
if enemies:
update_enemies()
# Wire up signals