Anonymous
public text v1 · immutable 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++;
}
}
}