menu + player

This commit is contained in:
2024-10-18 23:49:52 +02:00
parent cd190ad354
commit 67b81ee481
5 changed files with 74 additions and 5 deletions

View File

@@ -4,6 +4,10 @@ using System;
public partial class Player : CharacterBody2D
{
[Export] float Speed;
[ExportGroup("controls")]
[Export] Control menu;
public float PixelSize = 1.0f;
public override void _PhysicsProcess(double delta)
@@ -12,7 +16,9 @@ public partial class Player : CharacterBody2D
if(Input.IsActionPressed("quit"))
{
GetTree().Quit();
Input.MouseMode = Input.MouseModeEnum.Visible;
GetTree().Paused= true;
menu.Visible = true;
}