コード例 #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();
 }
コード例 #2
0
 public void DeactivateHitBox()
 {
     _collider.enabled = false;
     _data             = null;
 }
コード例 #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;
 }
コード例 #4
0
 public void ActivateHitBox(AttackData data)
 {
     _collider.enabled = true;
     _data             = data;
 }