protected override void RecyclingCollision(Recycling_Base other) { if (other.Dead) return; if (!other.Hurt) PushAwayFrom(other); if (Kat.Is("Punching") && PunchSuccess(other)) { if (other.LastAttackID == (Base.Sprite as Kat_Sprite).AttackID) return; Kat.Physics.hspeed = 0; other.GetHurt(5, (Base.Sprite.FacingRight) ? 2 : -2); if (Base.Sprite.FacingRight) Stitch.CreateHit(new Vector3(Base.Mask.Right + 10, Base.Mask.Center.y, Base.z)); else Stitch.CreateHit(new Vector3(Base.Mask.Left - 10, Base.Mask.Center.y, Base.z)); other.LastAttackID = (Base.Sprite as Kat_Sprite).AttackID; Game.FreezeFor(0.05f); return; } if (Kat.Is("Kicking") && KickSuccess(other)) { if (other.LastAttackID == (Base.Sprite as Kat_Sprite).AttackID) return; other.GetHurt(10, (Base.Sprite.FacingRight) ? 4 : -4); BounceOffEnemy(4); if (Base.Sprite.FacingRight) Stitch.CreateHit(new Vector3(Base.Mask.Right, Base.Mask.Center.y, Base.z)); else Stitch.CreateHit(new Vector3(Base.Mask.Left, Base.Mask.Center.y, Base.z)); other.LastAttackID = (Base.Sprite as Kat_Sprite).AttackID; Game.FreezeFor(0.05f); return; } if (Kat.Is("GroundPounding")) { if (other.LastAttackID == (Base.Sprite as Kat_Sprite).AttackID) return; other.GetHurt(10, (Base.Sprite.FacingLeft) ? 2 : -2); other.Physics.vspeed = -2; BounceOffEnemy(6, false); Kat.Physics.hspeed = 0; Stitch.CreateGroundHit(new Vector3(Base.x, Base.Mask.Bottom, Base.z)); other.LastAttackID = (Base.Sprite as Kat_Sprite).AttackID; Game.FreezeFor(0.05f); return; } if (Kat.Is("Uppercutting")) { if (other.LastAttackID == (Base.Sprite as Kat_Sprite).AttackID) return; other.GetHurt(10, (Kat.x > other.x) ? -2 : 2); BounceOffEnemy(7, false); other.LastAttackID = (Base.Sprite as Kat_Sprite).AttackID; Game.FreezeFor(0.05f); return; } if (!other.Hurt && !Kat.Is("Invincible") && !Kat.Is("Hurt")) GetHurt(other, 0.5f, 5); }
protected override void RecyclingCollision(Recycling_Base other) { other.GetHurt(10, (Base.Physics.hspeed > 0) ? 1f : -1f); Base.DestroySelf(); }