Merge branch 'master' into return-of-react

This commit is contained in:
ntr
2019-03-30 17:52:40 +11:00
9 changed files with 28 additions and 14 deletions
+2
View File
@@ -153,10 +153,12 @@ class CombatCryps extends Phaser.Scene {
this.drawCryps(game);
this.registry.events.on('changedata', this.updateData, this);
this.registry.set('crypStatusUpdate', false);
this.teams = game.teams.length;
}
updateData(parent, key, data) {
if (key === 'game' && data) {
if (data.teams.length !== this.teams) this.scene.restart(data);
const isAnimating = this.phase === 'animating';
this.game = data;
if (isAnimating) return false;
+1 -2
View File
@@ -72,10 +72,9 @@ class CombatHitBox extends Phaser.Scene {
this.game.events.emit('SEND_SKILL', game.id, activeSkill.cryp.id, c.id, activeSkill.skill.skill);
}
};
const crypSpawn = group.children.entries.find(s => s.cryp.id === c.id);
const team = c.account === account.id ? 0 : 1;
this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
if (crypSpawn) this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
});
});
this.scene.moveBelow('Combat');
+1 -1
View File
@@ -270,7 +270,7 @@ function createSocket(events) {
if (!account) events.loginPrompt();
if (process.env.NODE_ENV !== 'production') {
send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
// send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
}
return true;