diff --git a/Sandbox.csproj b/Sandbox.csproj index badc74b..6d96b26 100644 --- a/Sandbox.csproj +++ b/Sandbox.csproj @@ -1,4 +1,4 @@ - + net6.0 true diff --git a/Sandbox.csproj.old.1 b/Sandbox.csproj.old.1 new file mode 100644 index 0000000..badc74b --- /dev/null +++ b/Sandbox.csproj.old.1 @@ -0,0 +1,9 @@ + + + net6.0 + true + + + + + \ No newline at end of file diff --git a/Scripts/Player.cs b/Scripts/Player.cs index 33d3011..f85c7fe 100644 --- a/Scripts/Player.cs +++ b/Scripts/Player.cs @@ -34,17 +34,17 @@ public partial class Player : CharacterBody3D _weaponType = _projectiles.First(); } - public override void _UnhandledInput(InputEvent @event) - { + public override void _Process(double delta) + { if (Input.IsActionJustPressed("quit")) GetTree().Quit(); if (Input.IsActionJustPressed("shoot")) Shoot(); if (Input.IsActionJustPressed("switch")) SwitchWeaponType(); - } + } - public override void _PhysicsProcess(double delta) + public override void _PhysicsProcess(double delta) { var gravityDelta = _gravity * (float)delta; var velocity = CalculateMovement(Velocity, Transform, gravityDelta); diff --git a/project.godot b/project.godot index 4b4df72..33a47fb 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Sandbox" run/main_scene="res://Scenes/Main.tscn" -config/features=PackedStringArray("4.1", "C#", "Forward Plus") +config/features=PackedStringArray("4.0", "C#", "Forward Plus") [dotnet] @@ -81,5 +81,6 @@ shoot={ switch={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null) ] }