public void Draw(SpriteBatch spriteBatch, Camera cam, Texture2D texture)
 {
     for (int i = 0; i < MaxParticles; i++)
     {
         splitterParticles[i].Draw(spriteBatch, cam, texture);
     }
 }
Beispiel #2
0
        public GameView(GraphicsDeviceManager graphics, ContentManager content)
        {
            gameSeconds = 0;
            level = new Texture2D(graphics.GraphicsDevice, 1, 1);
            level.SetData<Color>(new Color[]
                {
                    Color.White
                });
            camera = new Camera(graphics.GraphicsDevice.Viewport);

            sprite = content.Load<Texture2D>("spark");

            InitiateParticleSystem();
        }
 public void Draw(SpriteBatch spriteBatch, Camera cam, Texture2D texture)
 {
     Vector2 vec = cam.scaleParticle(position.X, position.Y);
     spriteBatch.Draw(texture, vec,
     null, Color.White, 0f, Vector2.Zero, this.radius, SpriteEffects.None, 0f);
 }