fix: change levels names
This commit is contained in:
parent
faa106c5ca
commit
eff4d44bfb
|
@ -27,21 +27,21 @@ export default class Levels extends Scene {
|
||||||
this.primary = this.addUILayer("primary");
|
this.primary = this.addUILayer("primary");
|
||||||
|
|
||||||
|
|
||||||
const tutorial = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y - 100), text: "tutorial "});
|
const tutorial = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y - 100), text: "Start Game"});
|
||||||
tutorial.size.set(200, 50);
|
tutorial.size.set(200, 50);
|
||||||
tutorial.borderWidth = 2;
|
tutorial.borderWidth = 2;
|
||||||
tutorial.borderColor = Color.WHITE;
|
tutorial.borderColor = Color.WHITE;
|
||||||
tutorial.backgroundColor = Color.TRANSPARENT;
|
tutorial.backgroundColor = Color.TRANSPARENT;
|
||||||
tutorial.onClickEventId = "tutorial";
|
tutorial.onClickEventId = "start";
|
||||||
|
|
||||||
const porcelain = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y), text: "porcelain"});
|
const porcelain = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y), text: "porcelain(Test)"});
|
||||||
porcelain.size.set(200, 50);
|
porcelain.size.set(200, 50);
|
||||||
porcelain.borderWidth = 2;
|
porcelain.borderWidth = 2;
|
||||||
porcelain.borderColor = Color.WHITE;
|
porcelain.borderColor = Color.WHITE;
|
||||||
porcelain.backgroundColor = Color.TRANSPARENT;
|
porcelain.backgroundColor = Color.TRANSPARENT;
|
||||||
porcelain.onClickEventId = "porcelain";
|
porcelain.onClickEventId = "porcelain";
|
||||||
|
|
||||||
const greatwall = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y + 100), text: "greatwall"});
|
const greatwall = this.add.uiElement(UIElementType.BUTTON, "primary", {position: new Vec2(center.x, center.y + 100), text: "greatwall(Test)"});
|
||||||
greatwall.size.set(200, 50);
|
greatwall.size.set(200, 50);
|
||||||
greatwall.borderWidth = 2;
|
greatwall.borderWidth = 2;
|
||||||
greatwall.borderColor = Color.WHITE;
|
greatwall.borderColor = Color.WHITE;
|
||||||
|
@ -55,7 +55,7 @@ export default class Levels extends Scene {
|
||||||
back.backgroundColor = Color.TRANSPARENT;
|
back.backgroundColor = Color.TRANSPARENT;
|
||||||
back.onClickEventId = "back";
|
back.onClickEventId = "back";
|
||||||
|
|
||||||
this.receiver.subscribe("tutorial");
|
this.receiver.subscribe("start");
|
||||||
this.receiver.subscribe("porcelain");
|
this.receiver.subscribe("porcelain");
|
||||||
this.receiver.subscribe("greatwall");
|
this.receiver.subscribe("greatwall");
|
||||||
this.receiver.subscribe("back");
|
this.receiver.subscribe("back");
|
||||||
|
@ -68,7 +68,7 @@ export default class Levels extends Scene {
|
||||||
console.log(event);
|
console.log(event);
|
||||||
|
|
||||||
|
|
||||||
if(event.type === "tutorial"){
|
if(event.type === "start"){
|
||||||
let sceneOptions = {
|
let sceneOptions = {
|
||||||
physics: {
|
physics: {
|
||||||
groupNames: ["ground", "player", "enemies"],
|
groupNames: ["ground", "player", "enemies"],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user