package de.frajul.endlessroll.main.game;

import de.frajul.endlessroll.entities.Entity;
import de.frajul.endlessroll.entities.Obstacle;
import de.frajul.endlessroll.entities.particles.ParticleSystem;
import de.frajul.endlessroll.entities.textures.TexturePack;
import de.frajul.endlessroll.levels.ObstacleData;
import de.frajul.endlessroll.levels.worlds.World;

public class TestScreenScene extends Scene {

    private Obstacle testObstacle;

    public TestScreenScene(TexturePack texturePack, ParticleSystem particleSystem) {
        super(texturePack, particleSystem);
        terrain.createEndless(World.ICY_MOUNTAINS, -.8f);

        testObstacle = createObstacle(-1f, 1.139f, 0, 0.217f, true, false);
        obstacles.add(testObstacle);
        obstacles.add(createObstacle(-1f, 1.139f, 0, 0.217f, false, false));
    }

    private Obstacle createObstacle(float leftEdge, float rightEdge, float y, float height, boolean floating, boolean deadly){
        ObstacleData data = new ObstacleData();
        data.setLeftEdge(leftEdge);
        data.setRightEdge(rightEdge);
        data.setY(y);
        data.setHeight(height);
        data.setFloating(floating);
        data.setDeadly(deadly);
        return new Obstacle(World.GRASSLANDS, data, -.8f);
    }

}