Centered tutorial text for consistency
This commit is contained in:
parent
c7a629517c
commit
fb323809bc
@ -24,7 +24,7 @@ class GameScreen extends Container {
|
||||
// Initialise first level 1-1.js at startPosition 0
|
||||
var player = new Player(keys, window);
|
||||
|
||||
var level = new Level(require(__dirname + "/../levels/2-2.js"), keys, player, this);
|
||||
var level = new Level(require(__dirname + "/../levels/1-1.js"), keys, player, this);
|
||||
player.pos.x = level.startPos[0].x / 1;
|
||||
player.pos.y = level.startPos[0].y / 1;
|
||||
player.level = level;
|
||||
|
@ -25,7 +25,7 @@ class Tutorial extends Container {
|
||||
this.add(new Rect(this.game.w, this.game.h, { fill: "#333333" }));
|
||||
|
||||
const title = new Text("Tutorial", {fill: "#ffffff", font: "36px Minecraft"});
|
||||
title.pos = { x: 12, y: 44 };
|
||||
title.pos = { x: 247, y: 44 };
|
||||
this.add(title);
|
||||
|
||||
this.images = [
|
||||
@ -41,24 +41,24 @@ class Tutorial extends Container {
|
||||
}
|
||||
|
||||
// Controls direction
|
||||
this.images[0].pos = { x: 24, y: 60 };
|
||||
this.instructions[0].pos = { x: 12, y: 108 };
|
||||
this.images[0].pos = { x: 296, y: 60 };
|
||||
this.instructions[0].pos = { x: 130, y: 108 };
|
||||
|
||||
// Controls sprint
|
||||
this.images[1].pos = { x: 24, y: 116 };
|
||||
this.instructions[1].pos = { x: 12, y: 148 };
|
||||
this.images[1].pos = { x: 309, y: 116 };
|
||||
this.instructions[1].pos = { x: 95, y: 148 };
|
||||
|
||||
// Controls action
|
||||
this.images[2].pos = { x: 24, y: 156 };
|
||||
this.instructions[2].pos = { x: 12, y: 188 };
|
||||
this.images[2].pos = { x: 288, y: 156 };
|
||||
this.instructions[2].pos = { x: 140, y: 188 };
|
||||
|
||||
// Interact
|
||||
this.images[3].pos = { x: 24, y: 196 };
|
||||
this.images[3].pos = { x: 288, y: 196 };
|
||||
this.instructions[3].pos = { x: 12, y: 254 };
|
||||
this.instructions[4].pos = { x: 12, y: 274 };
|
||||
this.instructions[4].pos = { x: 17, y: 274 };
|
||||
|
||||
// Back to menu
|
||||
this.instructions[5].pos = { x: 12, y: 308 };
|
||||
this.instructions[5].pos = { x: 215, y: 308 };
|
||||
|
||||
for (let index = 0; index < this.instructions.length; index++) {
|
||||
if (this.images[index]) {
|
||||
|
Loading…
Reference in New Issue
Block a user