Finally bots can die. Player to. And another fixes.
This commit is contained in:
@ -27,8 +27,15 @@ public class Player : MonoBehaviour, ICharacter
|
||||
Condition.GiveHealth(-Mathf.RoundToInt(damage * (1 - Condition.ArmourPoints * 0.5f)));
|
||||
Condition.GiveArmour(-Mathf.RoundToInt(Mathf.Sqrt(damage) * 5));
|
||||
|
||||
if (Condition.HealthPoints < 0)
|
||||
OnDeathEvent?.Invoke(true);
|
||||
if (Condition.HealthPoints < 1)
|
||||
Die();
|
||||
}
|
||||
|
||||
private void Die()
|
||||
{
|
||||
print("dead");
|
||||
OnDeathEvent?.Invoke(true);
|
||||
CharacterFactory.Instance.ReSpawn(this, gameObject);
|
||||
}
|
||||
|
||||
public void ResetCharacter()
|
||||
|
Reference in New Issue
Block a user