Exemplo n.º 1
0
    public void OnDamageEvent(object sender, HitboxEventArgs e)
    {
        // Actor damaging this actor
        Actor  atkActor = e.Hitter.Actor;
        Attack atk      = e.Attack;

        Damage(atk.AttackType, atk.Damage, atkActor, e.Hitter.transform.position);
    }
Exemplo n.º 2
0
    private void NotifiyDamage(Hitbox incHitBox, Attack attack, Collider col)
    {
        HitboxEventArgs    e       = new HitboxEventArgs(attack, incHitBox, this, col);
        HitboxEventHandler handler = HitboxEvent;

        if (handler != null)
        {
            handler(this, e);
        }
    }