Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spriteBatch = new SpriteBatch();
- spriteTexture = new Texture(Gdx.files.internal("data/spriteTexture.png"));
- spriteTexture.setWrap(TextureWrap.Repeat,TextureWrap.Repeat);
- sprite = new Sprite(spriteTexture, 0, 0, 64, 64);
- sprite.setSize(256, 256);
- scrollTimer+=Gdx.graphics.getDeltaTime();
- if(scrollTimer>1.0f)
- scrollTimer = 0.0f;
- sprite.setU(scrollTimer);
- sprite.setU2(scrollTimer+1);
- spriteBatch.begin();
- sprite.draw(spriteBatch);
- spriteBatch.end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement