package de.frajul.endlessroll.entities.particles.attributes.attributeValues;

/**
 * Created by Julian on 02.08.2016.
 */
public class SpawnShape extends ParticleAttributeValue {

    public enum Shape {
        POINT("point"), SQUARE("square"), LINE("line");

        private String name;

        Shape(String name) {
            this.name = name;
        }

        public static Shape byName(String text) throws Exception {
            for (Shape shape : values())
                if (shape.name.equals(text))
                    return shape;
            throw new Exception("spawnShape with name \"" + text + "\" does not exist");
        }
    }

    private Shape shape;

    public SpawnShape() {
        super(ParticleAttributeValueType.SPAWN_SHAPE);
    }

    public Shape getShape() {
        return shape;
    }

    public void setShape(Shape shape) {
        this.shape = shape;
    }
}
