added instances to its own scene

This commit is contained in:
Mashy
2019-02-28 22:04:25 +10:00
parent 8abe18b0f1
commit dafbf145f8
5 changed files with 75 additions and 28 deletions
+9
View File
@@ -42,6 +42,15 @@ class HomeNavigation extends Phaser.Scene {
.text(shop.getCenter().x, shop.getCenter().y, 'Shop', TEXT.HEADER)
.setOrigin(0.5, 0.5);
shop.on('pointerdown', () => this.registry.set('homeShop', true));
const instances = this.add
.rectangle(X + BTN_WIDTH * 4.5, Y, BTN_WIDTH, BTN_HEIGHT, 0x222222)
.setInteractive()
.setOrigin(0);
this.add
.text(instances.getCenter().x, instances.getCenter().y, 'Instances', TEXT.HEADER)
.setOrigin(0.5, 0.5);
instances.on('pointerdown', () => this.registry.set('homeInstances', true));
}
cleanUp() {