Esempio n. 1
0
    protected override void WeedCollision(Weed_Base other)
    {
        other.GetHurt(10);

        if (!other.HasFooting) {
          if (Base.Physics.hspeed > 0)
        other.Physics.hspeed += 1f;
          else
        other.Physics.hspeed -= 1f;
        }

        Base.DestroySelf();
    }
Esempio n. 2
0
    protected override void WeedCollision(Weed_Base other)
    {
        if (other.Sprite.IsPlaying("weed_die"))
          return;

        if (!other.Sprite.IsPlaying("weed_bite") && GroundAttackSuccess(other)) {
          other.GetHurt();

          if (Base.Sprite.FacingRight)
        other.Physics.hspeed = other.Physics.hspeedMax;
          else
        other.Physics.hspeed = -other.Physics.hspeedMax;

          other.Physics.vspeed = (other.Mask.Center.y - Base.Mask.Center.y) / 2;

          BounceOffEnemy(6, Kat.Is("Kicking"));
        }

        else if (Kat.Is("GroundPounding")) {
          other.GetHurt();

          other.Physics.hspeed = 0;
          other.Physics.vspeed = -other.Physics.vspeedMax;

          BounceOffEnemy(8, false);
          Kat.Physics.hspeed = 0;
        }

        else if (!other.Sprite.IsPlaying("weed_bite") && Kat.Is("Uppercutting")) {
          other.GetHurt();

          other.Physics.hspeed = (other.x - Base.x) / 2;
          other.Physics.vspeed = other.Physics.vspeedMax;

          BounceOffEnemy(12, false);
        }

        else if (!other.hurt && !Kat.Is("Invincible") && !Kat.Is("Hurt"))
          Kat.State("Hurt", new object[] { other.x > Kat.x ? -5 : 5 });
    }