From 14538d486de312af41ce012836861468b8fb7897 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 5 Jun 2022 14:09:41 -0600 Subject: finish all necessary for playability --- src/entities/actors/snake/scripts/normal_state.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/entities/actors/snake/scripts/normal_state.gd') diff --git a/src/entities/actors/snake/scripts/normal_state.gd b/src/entities/actors/snake/scripts/normal_state.gd index 11981a3..1a9c1b1 100644 --- a/src/entities/actors/snake/scripts/normal_state.gd +++ b/src/entities/actors/snake/scripts/normal_state.gd @@ -13,6 +13,7 @@ func exit(next_state): func physics_process(delta: float) -> void: + fsm.rotate_on_input() fsm.player.velocity = fsm.player.direction * Global.SNAKE_SPEED fsm.player.velocity = fsm.player.move_and_slide(fsm.player.velocity) @@ -24,5 +25,5 @@ func input(event: InputEvent) -> void: exit("DashState") if fsm.player.can_slow and event.is_action_pressed("slow"): exit("SlowState") - # if fsm.player.can_jump and event.is_action_pressed("jump"): - # exit("JumpState") + if fsm.player.can_jump and event.is_action_pressed("jump"): + exit("JumpState") -- cgit v1.2.3