package de.frajul.particlelab.entities;

import de.frajul.particlelab.data.Color;
import de.frajul.particlelab.entities.textures.Texture;
import de.frajul.particlelab.data.Vector;

/**
 * Created by Julian on 20.11.2015.
 */
public class Entity extends Quad {

    private Color color;
    private Texture texture;
    private Vector movement;
    private float rotation;
    private float dynamicRotation;
    private float alpha = 1.0f;
    private boolean destroyed;

    public Entity(Texture texture, Vector position, float width, float height) {
        super(position, width, height);
        this.texture = texture;
        this.movement = new Vector();
    }

    public Entity(Texture texture, Color color, Vector position, float width, float height) {
        super(position, width, height);
        this.texture = texture;
        this.color = color;
        this.movement = new Vector();
    }

    public void move(Vector movement) {
        position.translate(movement);
    }

    public void rotate(float factor) {
        rotation += factor;
    }

    public Texture getTexture() {
        return texture;
    }

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

    public Vector getMovement() {
        return movement;
    }

    public void setMovement(Vector movement) {
        this.movement = movement;
    }

    public float getRotation() {
        return rotation;
    }

    public void setRotation(float rotation) {
        this.rotation = rotation;
    }

    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    public float getAlpha() {
        return alpha;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public Color getColor() {
        return color;
    }
}
