diff --git a/nodes/player/player.gd b/nodes/player/player.gd index d96becc..f8db6c7 100644 --- a/nodes/player/player.gd +++ b/nodes/player/player.gd @@ -16,7 +16,7 @@ const STATES= [ var use_gravity = { "climb": false, - "die": false, + "die": true, "idle": true, "jump": true, "spawn": true, @@ -30,7 +30,7 @@ func _ready(): $fsm.set_states(STATES) add_to_group("player") -func _enter_spawn(): +func on_enter_spawn_state(): $fsm.set_next_state("idle") func on_enter_idle_state(): @@ -59,7 +59,6 @@ func walk_state(_delta): if Input.is_action_just_pressed("ui_accept") and is_on_floor(): $fsm.set_next_state("jump") - # detect collision with wall or ceiling to enter climb state if is_on_wall() or (Input.is_action_pressed('ui_up') && is_on_ceiling()): velocity.y = 0 $fsm.set_next_state("climb") diff --git a/nodes/player/player.tscn b/nodes/player/player.tscn index bb802f5..7a2681d 100644 --- a/nodes/player/player.tscn +++ b/nodes/player/player.tscn @@ -24,4 +24,4 @@ shape = SubResource("CapsuleShape2D_w17ly") metadata/_edit_group_ = true [node name="camera" type="Camera2D" parent="."] -zoom = Vector2(4, 4) +zoom = Vector2(5, 5)