put clicks abck in
This commit is contained in:
parent
6f44ada3d9
commit
5c9af086bd
@ -194,4 +194,4 @@ class CombatCryps extends Phaser.GameObjects.Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = CombatCryps;
|
module.exports = { CombatCryps, CrypImage, CrypSkill };
|
||||||
|
|||||||
@ -3,7 +3,7 @@ const fs = require('fs');
|
|||||||
const { throttle } = require('lodash');
|
const { throttle } = require('lodash');
|
||||||
|
|
||||||
const { POSITIONS: { COMBAT }, TEXT } = require('./constants');
|
const { POSITIONS: { COMBAT }, TEXT } = require('./constants');
|
||||||
const CombatCryps = require('./combat.cryps');
|
const { CombatCryps, CrypImage, CrypSkill } = require('./combat.cryps');
|
||||||
const renderResolutions = require('./combat.render.resolutions');
|
const renderResolutions = require('./combat.render.resolutions');
|
||||||
|
|
||||||
const CRYP_KEY_MAP = ['keydown_ONE', 'keydown_TWO', 'keydown_THREE'];
|
const CRYP_KEY_MAP = ['keydown_ONE', 'keydown_TWO', 'keydown_THREE'];
|
||||||
@ -33,14 +33,14 @@ class Combat extends Phaser.Scene {
|
|||||||
this.registry.set('game', null);
|
this.registry.set('game', null);
|
||||||
}, 0, this);
|
}, 0, this);
|
||||||
|
|
||||||
// this.input.on('pointerup', (pointer, obj) => {
|
this.input.on('pointerup', (pointer, obj) => {
|
||||||
// if (obj[0] instanceof CrypImage || obj[0] instanceof CrypSkill) {
|
if (obj[0] instanceof CrypImage || obj[0] instanceof CrypSkill) {
|
||||||
// obj[0].clickHandler();
|
obj[0].clickHandler();
|
||||||
// } else if (this.registry.get('activeSkill')) {
|
} else if (this.registry.get('activeSkill')) {
|
||||||
// this.registry.get('activeSkill').clearTint();
|
this.registry.get('activeSkill').clearTint();
|
||||||
// this.registry.set('activeSkill', null);
|
this.registry.set('activeSkill', null);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
this.combatCryps = new CombatCryps(this);
|
this.combatCryps = new CombatCryps(this);
|
||||||
|
|
||||||
@ -82,8 +82,6 @@ class Combat extends Phaser.Scene {
|
|||||||
|
|
||||||
// do we need to render resolution animations?
|
// do we need to render resolution animations?
|
||||||
if (game.resolved.length !== this.renderedResolves) {
|
if (game.resolved.length !== this.renderedResolves) {
|
||||||
// Turn skills off...in future we might get it to show something else instead
|
|
||||||
this.combatCryps.removeSkills();
|
|
||||||
const newResolutions = game.resolved.slice(this.renderedResolves);
|
const newResolutions = game.resolved.slice(this.renderedResolves);
|
||||||
renderResolutions(this, game, this.combatCryps, newResolutions);
|
renderResolutions(this, game, this.combatCryps, newResolutions);
|
||||||
this.renderedResolves = game.resolved.length;
|
this.renderedResolves = game.resolved.length;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user