So, i'm currently working on a game in LibGDX.
I've got a class, "GraphicSprite" that extends Sprite.
public class GraphicSprite extends Sprite{
public GraphicSprite(Texture texture){
//WHERE WOULD I IMPORT THE TEXTURE TO THE SPRITE THAT'S BEING EXTENDED?
//SHOULD BE SOMETHING LIKE THIS? "this.(classBeingExtended) = new Sprite(texture);
}
}
When creating a SPRITE, you have to input some variables.
testSprite = new Sprite(TEXTURE HERE);
But, I want to create GraphicSprites (which extend Sprite). So if I do :
testGraphicSprite = new GraphicSprite(new Texture(".."));
How would I set the texture?