Mennu
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user