This commit is contained in:
2023-09-11 17:42:11 -07:00
parent ba9c1e320e
commit 4d8fbda71b
21 changed files with 123 additions and 67 deletions

View File

@@ -19,6 +19,7 @@ public partial class Character : CharacterBody3D
public override void _EnterTree()
{
Position = OwnerPlayer.SpawnPoint.Position;
CanShoot = true;
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
}
@@ -100,8 +101,6 @@ public partial class Character : CharacterBody3D
public void OnHit(Node3D node)
{
GD.Print($"Hit by {node.Name}");
if (this != null)
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
}
}