Fix input duplication
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user