minor edits.
This commit is contained in:
parent
acb73a8fda
commit
dce678adc6
@ -59,6 +59,12 @@ func _process(_delta: float) -> void:
|
|||||||
load_game()
|
load_game()
|
||||||
pass
|
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:
|
func second_counter() -> void:
|
||||||
time_available -= 1
|
time_available -= 1
|
||||||
timer_updated.emit(time_available)
|
timer_updated.emit(time_available)
|
||||||
@ -66,12 +72,6 @@ func second_counter() -> void:
|
|||||||
print_debug("You ran out of time! Emitting level_changed signal")
|
print_debug("You ran out of time! Emitting level_changed signal")
|
||||||
level_changed.emit(levels[current_level])
|
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:
|
func on_coin_collected(_body, coin) -> void:
|
||||||
print_debug("GC knows coin collected")
|
print_debug("GC knows coin collected")
|
||||||
|
|||||||
@ -20,7 +20,6 @@ func _ready() -> void:
|
|||||||
GameController.reset()
|
GameController.reset()
|
||||||
build_level()
|
build_level()
|
||||||
|
|
||||||
|
|
||||||
func _on_world_boundary_body_entered(body: Node2D) -> void:
|
func _on_world_boundary_body_entered(body: Node2D) -> void:
|
||||||
if body is Player:
|
if body is Player:
|
||||||
var current_scene = get_tree()
|
var current_scene = get_tree()
|
||||||
@ -30,7 +29,6 @@ func build_level() -> void:
|
|||||||
if coins:
|
if coins:
|
||||||
update_coins()
|
update_coins()
|
||||||
|
|
||||||
var _total_enemies : int = 0
|
|
||||||
if enemies:
|
if enemies:
|
||||||
update_enemies()
|
update_enemies()
|
||||||
# Wire up signals
|
# Wire up signals
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user