Beispiel #1
0
 /// <summary>
 /// Removes all HP from this object, and calls <see cref="OnDamage"/> in addition to <see cref="OnDeath"/>.
 /// </summary>
 /// <param name="hitInfo"></param>
 public void Kill(AttackData data)
 {
     PreviousHitData = data;
     OnDamage.Invoke();
     Kill();
 }
Beispiel #2
0
 public void DeactivateHitBox()
 {
     _collider.enabled = false;
     _data             = null;
 }
Beispiel #3
0
 /// <summary>
 /// Removes all HP from this object and calls <see cref="OnDeath"/>.
 /// </summary>
 /// <remarks>
 /// Sets <see cref="PreviousHitData"/> to null.
 /// </remarks>
 public void Kill()
 {
     Hp = 0;
     OnDeath.Invoke();
     PreviousHitData = null;
 }
Beispiel #4
0
 public void ActivateHitBox(AttackData data)
 {
     _collider.enabled = true;
     _data             = data;
 }