Initial jam build, 2 endings— secret ending glitches and doesn't show

title upon completion.
This commit is contained in:
Henry 2026-03-05 11:43:13 +00:00
parent ab0a4e24f7
commit 7b47e847ae
14 changed files with 496 additions and 58 deletions

View file

@ -26,6 +26,8 @@ func _ready():
#EventBus.enemy_died.connect(_on_enemy_died)
EventBus.enemy_hit.connect(_on_enemy_hit)
EventBus.flash_screen.connect(_on_flash_screen)
EventBus.win_game.connect(_on_win_game)
EventBus.secret_win_game.connect(_on_secret_win_game)
#func spawn_enemies():
@ -78,7 +80,7 @@ func _on_player_died():
# get_tree().call_group("enemies", "queue_free")
# $Player.set_process(false)
# get_tree().call_group("enemies", "set_process", false)
EventBus.goose_talk.emit(3)
EventBus.goose_talk.emit(7)
instance.queue_free()
game_over.show()
$LevelAudio.stop()
@ -91,6 +93,7 @@ func _on_player_died():
func new_game():
$CanvasLayer/Title.hide()
# Ensure enemies are cleared.
get_tree().call_group("boss", "queue_free")
get_tree().call_group("enemies", "queue_free")
get_tree().call_group("shards", "queue_free")
get_tree().call_group("enemy_bullets", "queue_free")
@ -115,7 +118,7 @@ func new_game():
# Do some DapperGoose talk
await get_tree().create_timer(1.5).timeout
EventBus.goose_talk.emit(2)
EventBus.goose_talk.emit(6)
# Tell the enemies to spawn!
#await get_tree().create_timer(.5).timeout
@ -143,11 +146,21 @@ func _on_start_pressed():
$Welcome.play()
new_game()
func win_game():
func _on_secret_win_game():
playing = false
game_over.show()
#await get_tree().create_timer(8).timeout
game_over.hide()
$CanvasLayer/Title.show()
start_button.show()
func _on_win_game():
playing = false
game_over.show()
$Player._on_player_victory()
await get_tree().create_timer(2).timeout
await get_tree().create_timer(8).timeout
game_over.hide()
$CanvasLayer/Title.show()
start_button.show()