Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }