added cooldowns back to skill text
This commit is contained in:
parent
a8672bbd45
commit
c0eac36e9f
@ -68,7 +68,10 @@ class CrypImage extends Phaser.GameObjects.Image {
|
|||||||
class CrypSkill extends Phaser.GameObjects.Text {
|
class CrypSkill extends Phaser.GameObjects.Text {
|
||||||
constructor(scene, x, y, team, skill, cryp) {
|
constructor(scene, x, y, team, skill, cryp) {
|
||||||
// Avatar will be a property of cryp
|
// Avatar will be a property of cryp
|
||||||
super(scene, x, y, skill.skill, TEXT.NORMAL);
|
|
||||||
|
const CD_TEXT = skill.cd ? `(${skill.cd}T)` : '';
|
||||||
|
const SKILL_TEXT = `${skill.skill} ${CD_TEXT}`;
|
||||||
|
super(scene, x, y, SKILL_TEXT, TEXT.NORMAL);
|
||||||
this.cryp = cryp; this.skill = skill; this.scene = scene;
|
this.cryp = cryp; this.skill = skill; this.scene = scene;
|
||||||
this.setInteractive();
|
this.setInteractive();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,8 +6,9 @@ const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://cryps.gg/ws' :
|
|||||||
function errorToast(err) {
|
function errorToast(err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return toast.error({
|
return toast.error({
|
||||||
title: 'Error',
|
title: 'BEEP BOOP',
|
||||||
message: err,
|
message: err,
|
||||||
|
position: 'topRight',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ function createSocket(events) {
|
|||||||
ws.addEventListener('open', (event) => {
|
ws.addEventListener('open', (event) => {
|
||||||
toast.info({
|
toast.info({
|
||||||
message: 'connected',
|
message: 'connected',
|
||||||
|
position: 'topRight',
|
||||||
});
|
});
|
||||||
|
|
||||||
events.loginPrompt();
|
events.loginPrompt();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user