GameSettings.stepsPerSecond=50;
GameSettings.setScreenSize(380, 260);
// Create our first room (link's house)
Level starterLevel = new Level() {{
depth = 5;
backgroundColour = new Color(15,8,47);
width = 1856;
height = 1504;
camera.setX(-60);
camera.setY(-40);
camera.setWidth(380);
camera.setHeight(260);
}};
// Create background
Background overworld = new Background() {{
addFrame(new Sprite("Resources/Backgrounds/Kokiri Forest/bg.png"));
addFrame(new Sprite("Resources/Sprites/Overlays/grass.png"));
properties.setCollisionMask("Resources/Backgrounds/Kokiri Forest/mask.png");
draw.setVisible(true);
draw.setLayer(GlobalVariables.groundLayer);
properties.setSolid(true);
}};
starterLevel.addBackground(overworld);
// Create shadows
Background overlay = new Background() {{
//addFrame(new Sprite("Resources/Backgrounds/Kokiri Forest/shadow.png"));
//addFrame(new Sprite("Resources/Backgrounds/Kokiri Forest/fg.png"));
draw.setVisible(true);
draw.setLayer(GlobalVariables.overlayLayer);
}};
starterLevel.addBackground(overlay);
//Create player
Player link = new Player() {{
position.setX(470);
position.setY(550);
draw.setVisible(true);
}};
starterLevel.addActor(link);
starterLevel.camera.setActor(link);
GlobalVariables.player = link;
// Shield
Shield shield = new Shield();
starterLevel.addActor(shield);
Sign sign = new Sign() {{
position.setX(355);
position.setY(405);
}};
starterLevel.addActor(sign);
//Create HUD
HUD hud = new HUD();
starterLevel.addActor(hud);
PauseDetect pauseDetect = new PauseDetect();
starterLevel.addActor(pauseDetect);
GlobalVariables.paused = false;
GlobalVariables.player.maxHealth = 8;
GlobalVariables.player.addHeart();
GlobalVariables.player.addHeart();