Example #1
0
        protected override void PreDrawUpdate(GameTime gameTime)
        {
            if (Random.NextFloat() > 0.99f)
            {
                var side = Vector2.Zero;
                if (Random.Coin())
                {
                    side = Origin + leftDrift * (float)Age(gameTime).TotalSeconds + momentum * (float)Age(gameTime).TotalSeconds - Sprite.TextureOrigin;
                }
                else
                {
                    side = Origin + rightDrift * (float)Age(gameTime).TotalSeconds + new Vector2(Sprite.TextureOrigin.X, 0) + momentum * (float)Age(gameTime).TotalSeconds - Sprite.TextureOrigin;
                }

                Particle.Add(new Particles.MultiBlast(side, (int)Sprite.TextureOrigin.Length() * 2));
            }

            base.PreDrawUpdate(gameTime);
        }
Example #2
0
File: GRandom.cs Project: kuviman/Q
 public static bool Coin()
 {
     lock (Lock)
         return(gen.Coin());
 }