reticle moves when firing, stunned enemies have stars now
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
extends Control
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var player: CharacterBody3D = $"../../../.."
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
@@ -13,7 +14,7 @@ func _process(delta: float) -> void:
|
||||
|
||||
|
||||
func _on_resume_pressed() -> void:
|
||||
level_control.pause_menu()
|
||||
resume()
|
||||
|
||||
|
||||
func _on_save__quit_pressed() -> void:
|
||||
@@ -22,3 +23,20 @@ func _on_save__quit_pressed() -> void:
|
||||
|
||||
func _on_load_pressed() -> void:
|
||||
SaveLoad.load_data()
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if Input.is_action_just_pressed("escape"):
|
||||
pause()
|
||||
|
||||
func pause():
|
||||
get_tree().paused = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
player.toggle_hud(false)
|
||||
player.pause_menu.show()
|
||||
|
||||
|
||||
func resume():
|
||||
hide()
|
||||
get_tree().paused = false
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
player.toggle_hud(true)
|
||||
|
||||
Reference in New Issue
Block a user