public static void MoveShelledIdleKoopa(IMario mario, IEnemy enemy) { Koopa koopa = (Koopa)enemy; if (mario.HitBox.Center.X <= koopa.EnemyHitBox().Center.X) { koopa.MoveRight(); ResolveOverlap(mario, koopa, Direction.left); } else { koopa.MoveLeft(); ResolveOverlap(mario, koopa, Direction.right); } }
public static void NormalMarioVsShelledIdleKoopaTopSideCollision(IMario mario, IEnemy enemy) { Koopa koopa = (Koopa)enemy; if (!koopa.DealDemage) { if (mario.HitBox.Center.X <= koopa.EnemyHitBox().Center.X) { koopa.MoveRight(); } else { koopa.MoveLeft(); } koopa.DealDemage = true; StatsManager.Instance.Enemykilled(koopa.Position, koopa.Score, mario.EnemyKillStreakCounter); } BumpUp(mario); ResolveOverlap(mario, koopa, Direction.top); }
public static void EnemyVsShelledIdleKoopaTopCollision(IEnemy mover, IEnemy target, Direction direction) { Koopa koopa = (Koopa)target; if (!koopa.DealDemage) { if (mover.HitBox.Center.X <= koopa.EnemyHitBox().Center.X) { koopa.MoveRight(); } else { koopa.MoveLeft(); } koopa.DealDemage = true; mover.EnemyKillStreakCounter++; StatsManager.Instance.Enemykilled(koopa.Position, koopa.Score, mover.EnemyKillStreakCounter); } ResolveOverlap(mover, koopa, direction); }