All pastes #589889 Raw Edit

Anonymous

public text v1 · immutable
#589889 ·published 2007-06-26 07:59 UTC
rendered paste body
        public void Draw(SpriteBatch spriteBatch)
        { 
            Rectangle sourceRectangle = new Rectangle(0, 0, 320, 240);

            if (currentTime == delayTime)
            {
                Graphics.GraphicsDevice.Clear(Color.Black);
                spriteBatch.Draw(textures[currentFrame],
                 new Vector2(50, 50),
                sourceRectangle,
                color,
                0.0f,
                new Vector2(0, 0),
                1.0f,
                SpriteEffects.None,
                layer);
                if (currentFrame < textures.Count - 1)
                {
                    currentFrame++;
                }
                else
                {
                    currentFrame = 0;
                }
            }
            else
            {
                currentTime++;
            }
        }

    }