Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }