This commit is contained in:
patrick_pluto 2024-08-03 22:24:08 +02:00
commit 8435fb0cf8
9 changed files with 140 additions and 36 deletions

View file

@ -33,12 +33,18 @@ func _ready():
npc = true
func _physics_process(delta):
if Input.is_action_just_pressed("escape"):
get_tree().change_scene_to_file("res://menus/main_menu.tscn")
Game.reset()
Server.reset()
if enabled:
if not is_on_floor():
velocity.y -= gravity * delta
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
@ -98,7 +104,6 @@ func _on_detect_hit_body_entered(body):
func captured(beast):
if !npc:
$in_bag.visible = true
print(beast)
$time_in_bag.start()
visible = false
enabled = false