now it's actually playable
This commit is contained in:
parent
5496914c2a
commit
b5439da5a0
13 changed files with 84 additions and 26 deletions
|
@ -8,6 +8,7 @@ public partial class Player : CharacterBody2D
|
|||
public delegate void KilledEventHandler();
|
||||
|
||||
public bool Alive = true;
|
||||
public bool Invincible = false;
|
||||
|
||||
public static Player Instance { get; private set; }
|
||||
|
||||
|
@ -65,7 +66,7 @@ public partial class Player : CharacterBody2D
|
|||
|
||||
public void Kill(Node2D killer)
|
||||
{
|
||||
if (!Alive)
|
||||
if (!Alive || Invincible)
|
||||
return;
|
||||
|
||||
GD.Print($"Killed by {killer.Name}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue