Beispiel #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;
        }