public void TakeDamage(float damage) { FloatValue res = BlackBoard.GetFloatVariableValue(VariableType.Health); if (res) { res.Value -= damage; } AISelector.EvaluateBehaviours(); }
public void TakeDamage(float damage) { health -= damage; AISelector.EvaluateBehaviours(); if (health < 0) { Destroy(this); } }