Esempio n. 1
0
 protected virtual void Damage(DamageSource source)
 {
     int power = source.GetPower ();
     print (power + " damage to Player!");
     controller.transform.rotation = Quaternion.LookRotation (source.GetDirection());
     animator.SetTrigger ("damage_trig");
     hp -= power;
     hp = Mathf.Max (0, hp);
 }
Esempio n. 2
0
    virtual protected void Damage(DamageSource source)
    {
        int power = source.GetPower();

        print(power + " damage to Player!");
        controller.transform.rotation = Quaternion.LookRotation(source.GetDirection());
        animator.SetTrigger("damage_trig");
        hp -= power;
        hp  = Mathf.Max(0, hp);
    }