package com.jan.entity;

import com.badlogic.gdx.maps.MapObject;
import com.jan.scene.Entity;

public class GameObject extends Entity {
    private float x;
    private float y;
    private float width;
    private float height;

    public GameObject(MapObject mapObject) {
        super(mapObject);
        loadProperties();
    }

    private void loadProperties() {
        x = (float)loadProperty("x");
        y = (float)loadProperty("y");
        width = (float)loadProperty("width");
        height = (float)loadProperty("height");
    }

    public float getX(){ return x; }
    public float getY(){ return y; }
    public void setX(float x){ this.x = x; }
    public void setY(float y){ this.y = y; }

    public float getWidth(){ return width; }
    public float getHeight(){ return height; }
    public void setWidth(float width){ this.width = width;}
    public void setHeight(float height){ this.height = height; }
}
