This commit is contained in:
MarcEricMartel
2022-10-11 14:32:39 -04:00
parent dce110a9b3
commit 0433b2c7c0
4 changed files with 120 additions and 54 deletions

View File

@@ -24,9 +24,10 @@ var gravity_vec = Vector3()
onready var head = $Head
onready var ground_check = $GroundCheck
onready var SlapGauge = $HUD/ActualHUD/SlapGauge
onready var Menu = $HUD/Start
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
pass
func _input(event):
if event is InputEventMouseMotion:
@@ -37,6 +38,9 @@ func _input(event):
func _physics_process(delta):
if Input.is_action_just_pressed("escape"):
Menu.openMenu();
if global_transform.origin.y < bottom_boudaries:
global_transform.origin.x = 0
global_transform.origin.y = 10
@@ -56,7 +60,6 @@ func _physics_process(delta):
gravity_vec = -get_floor_normal()
h_acceleration = normal_acceleration
if Input.is_action_just_pressed("jump") and (is_on_floor() or ground_check.is_colliding()):
gravity_vec = Vector3.UP * jump