Exemple #1
0
 public Particle AddSignal(Player player)
 {
     Particle p = new Particle(signalTexture, player.position);
     p.startScale = .2f;
     p.endScale = 4;
     p.startAlpha = 255;
     p.endAlpha = 0;
     p.target = player;
     p.life = 60;
     p.color = player.auraColor;
     p.illuminatingAllTheTime = true;
     p.StartParticleSystems();
     particleList.Add(p);
     return p;
 }
Exemple #2
0
        public Particle AddDreamSparkle(bool isPlayer1)
        {
            Particle p = new Particle(Art.sparkle, Vector2.Zero);
            p.speed = new Vector2(Mathness.RandomNumber(-2f, 2f), Mathness.RandomNumber(-2f, 2f));
            p.startScale = Mathness.RandomNumber(.5f, .8f);
            p.endScale = Mathness.RandomNumber(1.2f, 1.5f);
            p.rotationSpeed = Mathness.RandomNumber(.05f, .1f);
            //p.startScale = 1;
            //p.endScale = 1;
            p.fadeInOut = true;
            p.startAlpha = 0;
            p.endAlpha = 255;
            p.life = Mathness.RandomNumber(360, 480);
            p.alpha = 0;
            p.randomMinForce = new Vector2(-.1f);
            p.randomMaxForce = new Vector2(.1f);
            p.illuminatingAllTheTime = true;
            if (isPlayer1)
            {
                p.color = new Color(255, Mathness.RandomNumber(50, 150), Mathness.RandomNumber(50, 150));
                p.position = new Vector2(player1.position.X + Mathness.RandomNumber(-Game1.screenWidth, Game1.screenWidth), player1.position.Y + Mathness.RandomNumber(-Game1.screenHeight, Game1.screenHeight));
                p.SetPlayerMode(PlayerObjectMode.One);
            }
            else
            {
                p.color = new Color(Mathness.RandomNumber(50, 150), Mathness.RandomNumber(50, 150), 255);
                p.position = new Vector2(player2.position.X + Mathness.RandomNumber(-Game1.screenWidth, Game1.screenWidth), player2.position.Y + Mathness.RandomNumber(-Game1.screenHeight, Game1.screenHeight));
                p.SetPlayerMode(PlayerObjectMode.Two);
            }

            p.StartParticleSystems();

            particleList.Add(p);
            return p;
        }
Exemple #3
0
 public static void AddObjectDeath(Vector2 position)
 {
     for (int i = 0; i < 8; i++)
     {
         Particle p = new Particle(Art.smokePuff, position);
         p.life = 30;
         p.speed = new Vector2(Mathness.RandomNumber(-1.5f, 1.5f), Mathness.RandomNumber(-1.5f, 1.5f));
         p.startAlpha = 255;
         p.endAlpha = 0;
         p.startScale = Mathness.RandomNumber(.8f, 1.2f);
         p.endScale = Mathness.RandomNumber(1.8f, 2.2f);
         p.StartParticleSystems();
         particleList.Add(p);
     }
 }
Exemple #4
0
 public Particle AddBridgeSmoke()
 {
     Vector2 topLeft = new Vector2(1982, 494);
     Vector2 bottomRight = new Vector2(2317, 598);
     Particle p = new Particle(Art.smokePuff, new Vector2(Mathness.RandomNumber(topLeft.X, bottomRight.X), Mathness.RandomNumber(topLeft.Y, bottomRight.Y)));
     particleList.Add(p);
     p.startAlpha = 255;
     p.endAlpha = 0;
     p.startScale = 1.5f;
     p.endScale = 2f;
     p.rotationSpeed = Mathness.RandomNumber(-.1f, .1f);
     p.StartParticleSystems();
     return p;
 }
Exemple #5
0
        public static void AddCheckpointParticles(Vector2 position, bool isPlayer1)
        {
            for (int i = 0; i < 10; i++)
            {
                Particle p = new Particle(Art.sparkle, position);
                p.position += new Vector2(Mathness.RandomNumber(-10f, 10f), Mathness.RandomNumber(-10f, 10f));
                p.speed = new Vector2(Mathness.RandomNumber(-2f, 2f), Mathness.RandomNumber(-2f, 2f));
                p.randomMinForce = new Vector2(0, 0);
                p.randomMaxForce = new Vector2(0, .08f);
                p.startAlpha = 255;
                p.endAlpha = 0;
                p.startScale = .5f;
                p.endScale = .75f;
                p.life = 80;
                if (isPlayer1) p.color = Color.Red;
                else p.color = Color.Blue;
                p.illuminatingAllTheTime = true;

                p.StartParticleSystems();

                particleList.Add(p);
            }
        }