Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Creat a new class called Textures
- public class Textures {
- Texture backGround;
- public Textures(){
- //assuming your not using AssetManager
- backGround = new Texture(Gdx.files.internal("data/bg.jpg"));
- }
- }
- //in your main project class
- Textures t;
- // in your constructer
- t = new Textures();
- // when you want to draw the texture
- batch.begin();
- batch.draw(t.backGround,x,y,w,h);
- batch.end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement