package com.jan.entity;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.maps.MapObject;
import com.badlogic.gdx.maps.objects.TextureMapObject;

public class Renderable extends GameObject{

    private TextureRegion texture;

    public Renderable(MapObject mapObject) {
        super(mapObject);
        if(mapObject instanceof TextureMapObject){
            TextureMapObject textureObj =  (TextureMapObject)mapObject;
            texture = textureObj.getTextureRegion();
        }
    }

    public void setTexture(TextureRegion texture){
        this.texture = texture;
    }

    public TextureRegion getTexture(){
        return texture;
    }
    
}
