add select button to cryp list for mobile"
This commit is contained in:
parent
b43fc44303
commit
bfb721b5ee
@ -37,10 +37,12 @@ class CrypRows extends Phaser.GameObjects.Group {
|
||||
list.displaySkills(cryp);
|
||||
});
|
||||
|
||||
const selectFn = () => {
|
||||
list.game.events.emit('CRYP_ACTIVE', cryp);
|
||||
};
|
||||
|
||||
if (KEY_MAP[i]) {
|
||||
this.keyboard.on(KEY_MAP[i], () => {
|
||||
list.game.events.emit('CRYP_ACTIVE', cryp);
|
||||
}, this);
|
||||
this.keyboard.on(KEY_MAP[i], selectFn, this);
|
||||
}
|
||||
|
||||
row.cryp = cryp;
|
||||
@ -57,6 +59,15 @@ class CrypRows extends Phaser.GameObjects.Group {
|
||||
const CRYP_STATS = [cryp.stamina, cryp.phys_dmg, cryp.spell_dmg];
|
||||
CRYP_STATS.forEach(crypStat);
|
||||
|
||||
const selectBtn = list.add
|
||||
.rectangle(ROW_WIDTH - 50, ROW_Y, 50, ROW_HEIGHT, FILL, 0.5)
|
||||
.setInteractive()
|
||||
.setOrigin(0);
|
||||
|
||||
selectBtn.on('pointerdown', selectFn);
|
||||
|
||||
this.add(selectBtn);
|
||||
|
||||
this.add(list.add.text(ROW_WIDTH - 20, ROW_Y, i + 1, TEXT.HEADER));
|
||||
this.add(list.add.text(ROW_X, ROW_Y + (TEXT_MARGIN * 0), cryp.name, TEXT.HEADER));
|
||||
});
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
|
||||
* notifications
|
||||
|
||||
* cryp speed
|
||||
* modifies skill base speed
|
||||
|
||||
* rejoin in progress games
|
||||
* lock account to 1 open game at a time
|
||||
|
||||
@ -23,6 +26,7 @@
|
||||
* Cryp Generation
|
||||
|
||||
* Items
|
||||
* pve granted stat reroll items
|
||||
* Colour scheme
|
||||
|
||||
* Missions
|
||||
|
||||
@ -1081,7 +1081,6 @@ fn drain(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Reso
|
||||
return resolution;;
|
||||
}
|
||||
|
||||
// TODO is fukt
|
||||
fn drain_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||
let amount = cryp.spell_dmg().wrapping_div(2);
|
||||
let immunity = target.immune(Skill::DrainTick);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user