public void Draw(SpriteBatch spritebatch, Camera camera, Texture2D smokecloud)
 {
     float scale = camera.Scale(smokecloud,particlesize);
     //Coursepress
     //color fades to 0
     spritebatch.Draw(smokecloud, camera.Converttovisualcoords(currentpos, smokecloud), null, color, rotation, randomdirection, scale, SpriteEffects.None, 0);
 }
        public void Draw(SpriteBatch spritebatch, Camera camera, Texture2D smokecloud)
        {
            float scale = camera.Scale(particlesize, smokecloud.Width);

            //Coursepress
            //color fades to 0
            spritebatch.Draw(smokecloud, camera.Converttovisualcoords(currentpos, smokecloud.Width, smokecloud.Height, scale), null, color, rotation, randomdirection, scale, SpriteEffects.None, 0);
        }
        public void Draw(float timeElapsed)
        {
            fade       -= timeElapsed / maxtime;
            timealive  += timeElapsed;
            lifepercent = timealive / maxtime;

            currentsize = shockwaveminsize + lifepercent * shockwavemaxsize;
            scale       = camera.Scale(currentsize, shockwavetexture.Width);
            Color color = new Color(fade, fade, fade, fade);

            spritebatch.Draw(shockwavetexture, camera.Converttovisualcoords(currentPos, shockwavetexture.Width, shockwavetexture.Height, scale), null, color, 0, Vector2.Zero, scale, SpriteEffects.None, 0);
        }
        public void Draw(float elapsedtime)
        {
            timeElapsed += elapsedtime;

            float percentAnimated = timeElapsed / animationspeed;
            int   frame           = (int)(percentAnimated * totalframes);
            int   frameX          = frame % numframesX;
            int   frameY          = frame / numframesX;

            explosionwidth  = explosion.Width / numframesX;
            explosionheight = explosion.Height / numframesY;

            Rectangle rect = new Rectangle(explosionwidth * frameX, explosionheight * frameY, explosionwidth, explosionheight);

            spritebatch.Draw(explosion, camera.Converttovisualcoords(currentPos, explosionwidth, explosionheight, scale), rect, Color.White);
        }
Example #5
0
        public void Draw()
        {
            float scale = camera.Scale(particlesize, spark.Width);

            spritebatch.Draw(spark, camera.Converttovisualcoords(startpos, spark.Width, spark.Height, scale), null, Color.White, 0, randomdirection, scale, SpriteEffects.None, 0);
        }