示例#1
0
文件: Princess.cs 项目: rremigius/lgj
 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);
     }
 }
示例#2
0
    void DangerEffect(Danger danger)
    {
        if (dead)
        {
            return;
        }

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