Compare commits

..

No commits in common. '54bf676493d7b28a1b2d16310f26a9a3c2c73d64' and 'b2244386f388785be1652c20ddf0e678ae9b9f43' have entirely different histories.

  1. 7
      nodes/player/player.gd
  2. 2
      scenes/main_menu.tscn
  3. 2
      scripts/ui/change_scene_button.gd

@ -39,9 +39,6 @@ func on_enter_idle_state():
func idle_state(_delta):
var direction = Input.get_axis("ui_left", "ui_right")
if is_on_floor():
velocity.x = 0
if direction:
$fsm.set_next_state("walk")
elif Input.is_action_just_pressed("ui_accept") and is_on_floor():
@ -60,7 +57,7 @@ func walk_state(_delta):
$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()):
if is_on_wall() or is_on_ceiling():
velocity.y = 0
$fsm.set_next_state("climb")
@ -81,7 +78,7 @@ func jump_state(_delta):
velocity.x = 0
$fsm.set_next_state("idle")
if is_on_wall() || (is_on_ceiling() and Input.is_action_pressed("ui_up")):
if is_on_wall() or is_on_ceiling():
$fsm.set_next_state("climb")
func on_enter_climb_state():

@ -35,7 +35,7 @@ offset_right = 1279.0
offset_bottom = 853.0
text = "Play"
script = ExtResource("1_2rx5y")
TARGET_SCENE = "res://scenes/poc.tscn"
TARGET_SCENE = "res://scenes/main_menu.tscn"
[node name="quit" type="Button" parent="."]
layout_mode = 0

@ -5,4 +5,4 @@ class_name SceneChanger
func _pressed():
print("Changing scene to: " + TARGET_SCENE)
get_tree().change_scene_to_file(TARGET_SCENE)
get_tree().change_scene(TARGET_SCENE)

Loading…
Cancel
Save