Fix game over
This commit is contained in:
@@ -23,9 +23,9 @@ public partial class CapricornControls : Character
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed(_ownerPlayer.PlayerInput.Fire()) && CanShoot)
|
||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.Fire()) && CanShoot)
|
||||
Fire(_fireProjectile);
|
||||
if (Input.IsActionJustPressed(_ownerPlayer.PlayerInput.AltFire()) && CanShoot)
|
||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.AltFire()) && CanShoot)
|
||||
Fire(_altFireProjectile);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class CapricornControls : Character
|
||||
{
|
||||
var velocity = Velocity;
|
||||
|
||||
var inputDir = Input.GetVector(_ownerPlayer.PlayerInput.Left(), _ownerPlayer.PlayerInput.Right(), _ownerPlayer.PlayerInput.Up(), _ownerPlayer.PlayerInput.Down());
|
||||
var inputDir = Input.GetVector(OwnerPlayer.PlayerInput.Left(), OwnerPlayer.PlayerInput.Right(), OwnerPlayer.PlayerInput.Up(), OwnerPlayer.PlayerInput.Down());
|
||||
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
@@ -119,6 +119,6 @@ public partial class CapricornControls : Character
|
||||
public new void OnHit(Node3D node)
|
||||
{
|
||||
if (this != null)
|
||||
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, _ownerPlayer);
|
||||
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user