Merge branch 'master' of ssh://cryps.gg:40022/~/cryps

This commit is contained in:
Mashy 2018-11-27 19:48:10 +10:00
commit 05f8c8b6ba
2 changed files with 7 additions and 2 deletions

View File

@ -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();
} }

View File

@ -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();