Beispiel #1
0
 public void Draw(SpriteBatch sprite, Camera cam, Texture2D spark)
 {
     for (int i = 0; i < MAX_AMOUNT_PARTICLES; i++)
     {
         particles[i].Draw(sprite, cam, spark);
     }
 }
Beispiel #2
0
 public GameView(SpriteBatch Sprite, Camera Cam, Texture2D Spark)
 {
     spritebatch = Sprite;
     camera = Cam;
     spark = Spark;
     durationTime = 0;
     createParticles();
 }
Beispiel #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here

            camera = new Camera(GraphicsDevice.Viewport);
            gameView = new GameView(spriteBatch, camera, Content.Load<Texture2D>("spark"));
        }