/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.runner.game.descriptor.utils;

/**
 *
 * @author Karl
 */
public enum BackgroundPack{
    MOUNTAIN(Layer.CLOUDS_2.withSpeed(20), Layer.CLOUDS_1.withSpeed(25), Layer.MOUNTAIN_2.withSpeed(30), Layer.MOUNTAIN_1.withSpeed(35)), 
    FOREST(Layer.CLOUDS_2.withSpeed(20), Layer.CLOUDS_1.withSpeed(25), Layer.FOREST_2.withSpeed(30), Layer.FOREST_1.withSpeed(35)), 
    CITY(Layer.CLOUDS_2.withSpeed(20), Layer.CLOUDS_1.withSpeed(25), Layer.CITY_2.withSpeed(30), Layer.CITY_1.withSpeed(35)), 
    DESERT(Layer.CLOUDS_2.withSpeed(20), Layer.CLOUDS_1.withSpeed(25), Layer.DESERT_2.withSpeed(30), Layer.DESERT_1.withSpeed(35)), 
    HILL(Layer.CLOUDS_2.withSpeed(20), Layer.CLOUDS_1.withSpeed(25), Layer.HILL_2.withSpeed(30), Layer.HILL_1.withSpeed(35));

    public enum Layer{
        CLOUDS_1(0, 220, "clouds_1"),
        CLOUDS_2(0, 240, "clouds_2"),
        CITY_1(0, 0, "city_1"),
        CITY_2(0, 0, "city_2"),
        DESERT_1(0, 0, "desert_1"),
        DESERT_2(0, 0, "desert_2"),
        MOUNTAIN_1(0, 0, "mountain_1"),
        MOUNTAIN_2(0, 0, "mountain_2"),
        FOREST_1(0, 0, "forest_1"),
        FOREST_2(0, 0, "forest_2"),
        HILL_1(0, 0, "hill_1"),
        HILL_2(0, 0, "hill_2");

        public float x;
        public float y;
        public String resName;
        public float speed;

        private Layer(float x, float y, String resName) {
            this.x = x;
            this.y = y;
            this.resName = resName;
            this.speed = 0;
        }

        public Layer withSpeed(float speed){
            this.speed = speed;
            return this;
        }
    }
    private Layer[] backgrounds;

    private BackgroundPack(Layer... backgrounds){
        this.backgrounds = backgrounds;
    }

    public Layer[] getLayers() {
        return backgrounds;
    }
}

@@ -859,867 +859,8 @@
 );%0A%0A
-    public enum Layer%7B%0A        CLOUDS_1(0, 220, %22clouds_1%22),%0A        CLOUDS_2(0, 240, %22clouds_2%22),%0A        CITY_1(0, 0, %22city_1%22),%0A        CITY_2(0, 0, %22city_2%22),%0A        DESERT_1(0, 0, %22desert_1%22),%0A        DESERT_2(0, 0, %22desert_2%22),%0A        MOUNTAIN_1(0, 0, %22mountain_1%22),%0A        MOUNTAIN_2(0, 0, %22mountain_2%22),%0A        FOREST_1(0, 0, %22forest_1%22),%0A        FOREST_2(0, 0, %22forest_2%22),%0A        HILL_1(0, 0, %22hill_1%22),%0A        HILL_2(0, 0, %22hill_2%22);%0A%0A        public float x;%0A        public float y;%0A        public String resName;%0A        public float speed;%0A%0A        private Layer(float x, float y, String resName) %7B%0A            this.x = x;%0A            this.y = y;%0A            this.resName = resName;%0A            this.speed = 0;%0A        %7D%0A%0A        public Layer withSpeed(float speed)%7B%0A            this.speed = speed;%0A            return this;%0A        %7D%0A    %7D%0A
     

Fix layer double