diff --git a/MrBigsock/Assets/Code/Character.cs b/MrBigsock/Assets/Code/Character.cs index e268fc0db18c5aeec8a5c3c8824fa25a867d3190..5e5f6cde48ae60121bbe050472844cd9c1b6a1d4 100644 --- a/MrBigsock/Assets/Code/Character.cs +++ b/MrBigsock/Assets/Code/Character.cs @@ -101,16 +101,7 @@ namespace BigSock { /* Adds damage to the player if they don't have IFrames. */ - public bool TakeDamage(float amount) { - return TakeDamage(new AttackStats{ - Damage = amount, - }); - } - - /* - Adds damage to the player if they don't have IFrames. - */ - public bool TakeDamage(IAttackStats attack) { + public virtual bool TakeDamage(IAttackStats attack) { // Check if player has IFrames if(NextTimeCanTakeDamage > DateTime.Now) return false; @@ -155,7 +146,7 @@ namespace BigSock { /* Method for what to do when the character dies. */ - protected void OnDeath() { + protected virtual void OnDeath() { print($"[Character.TryKill()] start. | {HP}, {Alive}"); Destroy(gameObject); }