Exemplo n.º 1
0
 void DangerEffect(Danger danger)
 {
     health.Hurt(danger.DamageOnTouch);
     hurt = true;
     if (GetComponent <Rigidbody2D>().velocity.y < 0.5f)
     {
         Disable(0.3f);
         GetComponent <Rigidbody2D>().AddRelativeForce(-100 * Vector2.right);
     }
 }
Exemplo n.º 2
0
    void DangerEffect(Danger danger)
    {
        if (dead)
        {
            return;
        }

        health.Hurt(danger.DamageOnTouch);
        hurt = true;
    }