package xaero.rotatenjump.game.levels;

import xaero.rotatenjump.game.Game;
import xaero.rotatenjump.game.Level;
import xaero.rotatenjump.game.object.Accelerator;
import xaero.rotatenjump.game.object.Coin;
import xaero.rotatenjump.game.object.Platform;

/**
 * Created by xaero on 10/07/2017.
 */

public class Level4 extends Level {

    public Level4(){
        buttonText = "4";
        winOnAttach = true;
        scoreboardX = 0;
        scoreboardY = 2400;
        threeStarTime = 500;
    }

    @Override
    public void constructLevel(Game game) {
        super.constructLevel(game);
        game.gameStarted = false;
        add(game, new Platform(-50, 2000, 6, 0, 20f, -1.5f));
        add(game, new Coin(0, 2000));
        for(int i = 2; i < 71; i++) {
            float angle = i * 2.5f;
            float x = (float) (1000 * Math.sin(Math.toRadians(angle)));
            float y = 1000 - (float) (1000 * Math.cos(Math.toRadians(angle)));
            add(game, new Accelerator(x, y, angle + (i < 32 ? 7 : 0), 75));
        }
    }
}
