ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée

This commit is contained in:
2026-02-07 00:22:12 +01:00
parent 5722fbb437
commit 3fa84994cd
45 changed files with 885 additions and 321 deletions

View File

@@ -0,0 +1,43 @@
extends CanvasLayer
var pause = false : set = set_pause
func _ready():
hide()
func set_pause(p):
if p != pause:
if p:
%AnimationPlayer.play("pause")
else:
%AnimationPlayer.play_backwards("pause")
pause = p
get_tree().paused = pause
%Settings.close_settings()
%Controls.close_controls()
if p :
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
elif GameInfo.game_data.actual_scene.mouse_captured:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
if not p:
GameInfo.save_settings()
func _input(_event):
if Input.is_action_just_pressed("pause"):
pause = not pause
func _on_resume_pressed():
pause = false
func _on_quit_pressed():
get_tree().quit()
func _on_game_gui_pause_asked():
pause = true
func _on_settings_pressed():
%Settings.open_settings()
func _on_controls_pressed():
%Controls.open_controls()