pumpkin carving

This commit is contained in:
2025-10-27 18:29:06 +01:00
parent b36923a196
commit bfd653c136
22 changed files with 296 additions and 29 deletions

View File

@@ -9,13 +9,10 @@ enum Events { NONE, PUMPKIN_CARVE, OUTSIDE_NORMAL }
var current_event: Events = Events.NONE
func transition_start() -> void:
player_free = false
animation_player.play("transition")
func transition_end() -> void:
animation_player.play_backwards("transition")
await animation_player.animation_finished
player_free = true
func run_event(event: Events, player_postion: Vector2 = Vector2.ZERO):
current_event = event
@@ -24,9 +21,9 @@ func run_event(event: Events, player_postion: Vector2 = Vector2.ZERO):
player.position = player_postion
match event:
Events.PUMPKIN_CARVE:
player_free = false
get_tree().change_scene_to_file("uid://ccfdsdgaon63m") # scenes/levels/home.tscn
await get_tree().scene_changed
player.animated_sprite.animation = "sit" # should be replaced with chair interaction trigger
transition_end()
func transition_scene_file(scene: String) -> void: