DarkTornado

Particle System Effect Example

Jun 5th, 2011
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1.         spriteBatch = new SpriteBatch(GraphicsDevice);
  2.             Particle.spriteBatch = spriteBatch;
  3.             Particle.graphics = graphics;
  4.             sprite = Content.Load<Texture2D>("circle");
  5.             font = Content.Load<SpriteFont>("SpriteFont1");
  6.             emitter = new Emitter[10];
  7.             Color[] yellowRed = new Color[] { new Color(0.8f, 0.8f, 0.3f, 0.5f), new Color(0.8f, 0.3f, 0.3f, 0.5f) };
  8.             Emitter.ParticleCreationData creationData = new Emitter.ParticleCreationData(50, new ParticleData(yellowRed, new Particle.Property(5, 5, -0.2f, 0), new Particle.Property(0, 0, 0, 0), new Particle.Property(50, 0, 10, 0), new Particle.Property(0, 0, 30, 0), sprite, false, 10000));
  9.             for (int i = 0; i < 10; i++)
  10.             {
  11.                 emitter[i] = new Emitter(new Vector2(400, 100 + i * 20), new Emitter.ParticleCreationData[] { creationData });
  12.             }
Advertisement
Add Comment
Please, Sign In to add comment