Final jam version submisson: added placeholder sounds, fixed character

flashing on game restart.
This commit is contained in:
Henry 2026-03-08 14:26:21 +00:00
parent 8679e817ee
commit df13ee42d8
36 changed files with 400 additions and 58 deletions

View file

@ -4,6 +4,7 @@ var player = preload("res://scenes/player.tscn")
var instance = null
var playing: bool = false
var enemy_wave: int
var enemy_count: int = 0:
set(value):
@ -30,7 +31,7 @@ func _ready():
EventBus.secret_win_game.connect(_on_secret_win_game)
#func spawn_enemies():
#func spawn_enemies():
## print("Remaining enemies: ", enemy_count)
## await get_tree().process_frame
#enemy_wave += 1
@ -80,6 +81,7 @@ func _on_player_died():
# get_tree().call_group("enemies", "queue_free")
# $Player.set_process(false)
# get_tree().call_group("enemies", "set_process", false)
$SFX/AmbientHiss.stop()
EventBus.goose_talk.emit(7)
instance.queue_free()
game_over.show()
@ -106,15 +108,14 @@ func new_game():
Global.score = 0
$CanvasLayer/UI.update_score(Global.score)
# Tell the shield to recharge.
# EventBus.initialize_shieldbar.emit()
# await EventBus.initialize_shieldbar
# Tell the shield to recharge without flashing the player.
# instantiate the Player
# await get_tree().create_timer(1).timeout
instance = player.instantiate()
add_child(instance)
$Player.start()
$SFX/AmbientHiss.play()
# Reset Clouds
EventBus.cloud_speed.emit(false)
@ -177,7 +178,7 @@ func _on_win_game(value: int):
playing = false
$Player._on_player_victory(2)
await $Player._on_player_victory(2)
game_over.show()
game_over.show()
await get_tree().create_timer(5).timeout
game_over.hide()
$CanvasLayer/Title.show()
@ -186,6 +187,7 @@ func _on_win_game(value: int):
func _on_flash_screen(duration: float = .25):
print("flash!")
$SFX/Tuner.play()
$CanvasLayer/ColorRect.visible = true
await get_tree().create_timer(duration).timeout
#var tween = create_tween().set_parallel(false)