예제 #1
0
        public void UpdateRainbowStarTrail()
        {
            CGPoint position       = player.GetPosition();
            CGPoint screenPosition = Utilities.GetScreenPositionP1(position, (Globals.g_world.GetGame()).GetScrollPosition());

            if (!Utilities.IsOnScreen(screenPosition))
            {
                return;
            }

            int howMany;

            if (Globals.g_world.artLevel == 0)
            {
                if ((Globals.g_world.game).numPlayersOnScreen >= 3)
                {
                    if (Utilities.GetRand(2) == 0)
                    {
                        return;
                    }
                }

                howMany = 1;
            }
            else
            {
                howMany = 2;
            }

            for (int i = 0; i < howMany; i++)
            {
                Particle particle;
                bool     isAdditive = false;
                if (Utilities.GetRand(9) == 0)
                {
                    particle   = (ParticleSystemRoss.Instance()).GetNextFreeParticleP1(ParticleList.t_AdditiveInFrontOfPlayer, "rainbowstars");
                    isAdditive = true;
                }
                else
                {
                    particle = (ParticleSystemRoss.Instance()).GetNextFreeParticleP1(ParticleList.t_AfterEverything, "rainbowstars");
                }

                if (particle != null)
                {
                    particle.Launch_RainbowStarTrail(Utilities.CGPointMake(position.x, position.y - 15.0f));
                    particle.SetIsAdditive(isAdditive);
                }
            }

            if (timer >= 2)
            {
            }

            timer += Constants.kFrameRate;
        }
예제 #2
0
        public void RenderOtherBank()
        {
            return;

            CGPoint mapPos         = Utilities.CGPointMake(xFlowerPosition, yCliffStart + (6 * 64));
            CGPoint screenPosition = Utilities.GetScreenPositionP1(mapPos, (Globals.g_world.GetGame()).GetScrollPosition());
            int     xPlayerTile    = ((Globals.g_world.game).player).xCurrentTile;

            screenPosition.x  = -32 + (((float)(xPlayerTile)) * 64.0f);
            screenPosition.y -= 40.0f;
            for (int i = 0; i < 5; i++)
            {
                if (((i + 1) >= xPlayerTile) && ((i - 1) <= xPlayerTile))
                {
                    (DrawManager.Instance()).AddTextureToListP1(screenPosition, 6);
                    screenPosition.x += 64;
                }
            }
        }
예제 #3
0
        public void UpdateActive()
        {
            if (knockedOver)
            {
                const float kHitSlowDown = 0.05f;
                velocity.y -= kHitSlowDown;
                if (velocity.y > 0)
                {
                    position.y += velocity.y;
                }
            }
            else
            {
                if (((int)movement != (int)CowMovement.kCowStandingStillRight) && ((int)movement != (int)CowMovement.kCowStandingStillLeft))
                {
                    this.UpdateWalkWobble();
                    position.x -= velocity.x;
                    position.y += velocity.y;
                    nowAnim.UpdateWithDistance(Utilities.GetABS(velocity.x));
                }
            }

            this.UpdateBlinking();
            ((Globals.g_world.game).GetNoGoZone(noGoZoneId)).SetMapPosition(Utilities.CGPointMake(position.x, position.y - 5.0f));
            screenPosition = Utilities.GetScreenPositionP1(position, (Globals.g_world.GetGame()).GetScrollPosition());
            if (screenPosition.y < -40)
            {
                this.SetState(CowState.e_Inactive);
            }

            if (stillHasMapObject)
            {
                mapObject.SetTexture(nowAnim.GetTexture());
                mapObject.SetPosition(position);
            }
        }