more zone stuff
This commit is contained in:
@@ -124,7 +124,7 @@ class MenuGameList extends Phaser.Scene {
|
||||
|
||||
zones.on('pointerdown', () => {
|
||||
this.scene.add('Missions', Missions, true);
|
||||
return ws.sendZoneCreate();
|
||||
return ws.sendAccountZone();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -16,16 +16,20 @@ class Missions extends Phaser.Scene {
|
||||
}
|
||||
|
||||
create() {
|
||||
const zone = this.registry.get('zone');
|
||||
if (!zone) return false;
|
||||
|
||||
this.scene.manager.add('MissionControls', MissionControls, true);
|
||||
this.graphics = this.add.graphics();
|
||||
const nodeData = this.registry.get('zone').nodes;
|
||||
this.edgeData = this.registry.get('zone').edges.map(x => x.map(y => nodeData[y]));
|
||||
const nodeData = zone.graph.nodes;
|
||||
this.edgeData = zone.graph.edges.map(x => x.map(y => nodeData[y]));
|
||||
this.cameras.main.setViewport(COMBAT.width() * 0.2, COMBAT.y(),
|
||||
COMBAT.width() * 0.8, COMBAT.height());
|
||||
this.addNodes(nodeData);
|
||||
this.drawEdges(nodeData);
|
||||
this.addCameraControl();
|
||||
this.addEvents();
|
||||
return this;
|
||||
}
|
||||
|
||||
addNodes(nodeData) {
|
||||
|
||||
Reference in New Issue
Block a user