public static void NormalMarioVsShelledMovingKoopaTopSideCollision(IMario mario, IEnemy enemy) { Koopa koopa = (Koopa)enemy; if (koopa.DealDemage) { koopa.Flipped(); mario.EnemyKillStreakCounter++; koopa.ObjState = ObjectState.NonCollidable; StatsManager.Instance.Enemykilled(koopa.Position, koopa.Score, mario.EnemyKillStreakCounter); AudioFactory.Instance.CreateSound(Stomp).Play(); } ResolveOverlap(mario, koopa, Direction.top); }
public static void EnemyVsShelledMovingKoopaTopCollision(IEnemy mover, IEnemy target, Direction direction) { Koopa koopa = (Koopa)target; if (!koopa.DealDemage) { koopa.Flipped(); koopa.EnemyKillStreakCounter++; koopa.ObjState = ObjectState.NonCollidable; StatsManager.Instance.Enemykilled(koopa.Position, koopa.Score, mover.EnemyKillStreakCounter); AudioFactory.Instance.CreateSound(Stomp).Play(); } ResolveOverlap(mover, koopa, direction); }