//health component + dtf component test

    public void TakeDamage(OnDamageRecievedEventData DamageData)
    {
        DamageTextFactory.Make("-" + DamageData.Damage.ToString());
        Health.TakeDamage(DamageData.Damage);
        if (Health.CurrentValue < 0)
        {
            LockOnEmitter.Emit(new OnLockReleaseEventData());
            Destroy(this.gameObject);
        }
    }
Esempio n. 2
0
 public void TakeDamage(OnDamageRecievedEventData DamageData)
 {
     DamageTextFactory.Make("-" + DamageData.Damage.ToString());
     Health.TakeDamage(DamageData.Damage);
     if (Health.CurrentValue < 0)
     {
         LockOnEmitter.Emit(new OnLockReleaseEventData());
         GameObject g = Instantiate(Corpse);
         g.transform.position = transform.position;
         Destroy(gameObject);
     }
 }
 public void Emit(OnDamageRecievedEventData e)
 {
     Handler.OnReceiveDamage.Invoke(e);
 }
 public void TakeDamage(OnDamageRecievedEventData e)
 {
     Health.TakeDamage(e.Damage);
     HealthBar.UpdateBar();
 }