Revert "change to bitmap text"
This reverts commit 99d0231a9cc796f6e46abbf005843ab4e3c5033f.
This commit is contained in:
parent
9e16201f3d
commit
fd1c693f01
@ -9,7 +9,7 @@ const Combat = require('./combat');
|
|||||||
|
|
||||||
function renderCryps() {
|
function renderCryps() {
|
||||||
const config = {
|
const config = {
|
||||||
type: Phaser.CANVAS,
|
type: Phaser.AUTO,
|
||||||
// backgroundColor: '#181818',
|
// backgroundColor: '#181818',
|
||||||
resolution: window.devicePixelRatio,
|
resolution: window.devicePixelRatio,
|
||||||
scale: {
|
scale: {
|
||||||
|
|||||||
@ -17,12 +17,10 @@ class Header extends Phaser.Scene {
|
|||||||
aztecImg.onload = () => {
|
aztecImg.onload = () => {
|
||||||
this.textures.addAtlas('aztec', aztecImg, aztecAtlas);
|
this.textures.addAtlas('aztec', aztecImg, aztecAtlas);
|
||||||
};
|
};
|
||||||
this.load.bitmapFont('gothic', 'https://labs.phaser.io/assets/fonts/bitmap/gothic.png',
|
|
||||||
'https://labs.phaser.io/assets/fonts/bitmap/gothic.xml');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.add.bitmapText(0, 0, 'gothic', 'cryps.gg', 20);
|
this.add.text(0, 0, 'cryps.gg', TEXT.HEADER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class HomeCrypList extends Phaser.Scene {
|
|||||||
'aztec',
|
'aztec',
|
||||||
genAvatar(cryp.name)
|
genAvatar(cryp.name)
|
||||||
);
|
);
|
||||||
this.add.bitmapText(ROW_X + BOX_WIDTH, ROW_Y, 'gothic', cryp.name, 20)
|
this.add.text(ROW_X + BOX_WIDTH, ROW_Y, cryp.name, TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ class HomeCrypList extends Phaser.Scene {
|
|||||||
this.game.events.emit('CRYP_SPAWN');
|
this.game.events.emit('CRYP_SPAWN');
|
||||||
});
|
});
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(spawn.getCenter().x, spawn.getCenter().y, 'gothic', '+', 20)
|
.text(spawn.getCenter().x, spawn.getCenter().y, '+', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
const joinNormal = this.add
|
const joinNormal = this.add
|
||||||
@ -112,7 +112,7 @@ class HomeCrypList extends Phaser.Scene {
|
|||||||
ws.sendPlayerCrypsSet(NULL_UUID, playerCryps);
|
ws.sendPlayerCrypsSet(NULL_UUID, playerCryps);
|
||||||
});
|
});
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(joinNormal.getCenter().x, joinNormal.getCenter().y, 'gothic', 'Join Normal', 20)
|
.text(joinNormal.getCenter().x, joinNormal.getCenter().y, 'Join Normal', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
const joinInstance = this.add
|
const joinInstance = this.add
|
||||||
@ -125,7 +125,7 @@ class HomeCrypList extends Phaser.Scene {
|
|||||||
ws.sendInstanceJoin(playerCryps);
|
ws.sendInstanceJoin(playerCryps);
|
||||||
});
|
});
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(joinInstance.getCenter().x, joinInstance.getCenter().y, 'gothic', 'New Instance', 20)
|
.text(joinInstance.getCenter().x, joinInstance.getCenter().y, 'New Instance', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class HomeRankings extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.add.bitmapText(X, Y, 'gothic', 'Instances Scene', 20);
|
this.add.text(X, Y, 'Instances Scene', TEXT.HEADER);
|
||||||
const playerList = this.registry.get('playerList');
|
const playerList = this.registry.get('playerList');
|
||||||
const addInstance = (player, i) => {
|
const addInstance = (player, i) => {
|
||||||
const joinNormal = this.add
|
const joinNormal = this.add
|
||||||
@ -23,7 +23,7 @@ class HomeRankings extends Phaser.Scene {
|
|||||||
this.game.events.emit('SET_PLAYER', player);
|
this.game.events.emit('SET_PLAYER', player);
|
||||||
});
|
});
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(joinNormal.getCenter().x, joinNormal.getCenter().y, 'gothic', `${player.instance}`, 20)
|
.text(joinNormal.getCenter().x, joinNormal.getCenter().y, `${player.instance}`, TEXT.NORMAL)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
.setInteractive()
|
.setInteractive()
|
||||||
.setOrigin(0);
|
.setOrigin(0);
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(ranks.getCenter().x, ranks.getCenter().y, 'gothic', 'Rankings', 20)
|
.text(ranks.getCenter().x, ranks.getCenter().y, 'Rankings', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
ranks.on('pointerdown', () => this.registry.set('homeRankings', true));
|
ranks.on('pointerdown', () => this.registry.set('homeRankings', true));
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
.setInteractive()
|
.setInteractive()
|
||||||
.setOrigin(0);
|
.setOrigin(0);
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(news.getCenter().x, news.getCenter().y, 'gothic', 'News', 20)
|
.text(news.getCenter().x, news.getCenter().y, 'News', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
news.on('pointerdown', () => this.registry.set('homeNews', true));
|
news.on('pointerdown', () => this.registry.set('homeNews', true));
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
.setInteractive()
|
.setInteractive()
|
||||||
.setOrigin(0);
|
.setOrigin(0);
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(shop.getCenter().x, shop.getCenter().y, 'gothic', 'Shop', 20)
|
.text(shop.getCenter().x, shop.getCenter().y, 'Shop', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
shop.on('pointerdown', () => this.registry.set('homeShop', true));
|
shop.on('pointerdown', () => this.registry.set('homeShop', true));
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
.setInteractive()
|
.setInteractive()
|
||||||
.setOrigin(0);
|
.setOrigin(0);
|
||||||
this.add
|
this.add
|
||||||
.bitmapText(instances.getCenter().x, instances.getCenter().y, 'gothic', 'Instances', 20)
|
.text(instances.getCenter().x, instances.getCenter().y, 'Instances', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
instances.on('pointerdown', () => this.registry.set('homeInstances', true));
|
instances.on('pointerdown', () => this.registry.set('homeInstances', true));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,8 @@ class HomeNews extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.add.bitmapText(X, Y, 'gothic', 'News Scene', 20);
|
this.add.text(X, Y, 'News Scene', TEXT.HEADER);
|
||||||
this.add.bitmapText(X, Y + HEIGHT * 0.1, 'gothic', 'some other stuff here', 20);
|
this.add.text(X, Y + HEIGHT * 0.1, 'some other stuff here', TEXT.NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
|
|||||||
@ -12,8 +12,8 @@ class HomeRankings extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.add.bitmapText(X, Y, 'gothic', 'Rankings Scene', 20);
|
this.add.text(X, Y, 'Rankings Scene', TEXT.HEADER);
|
||||||
this.add.bitmapText(X, Y + HEIGHT * 0.1, 'gothic', 'some other stuff here', 20);
|
this.add.text(X, Y + HEIGHT * 0.1, 'some stuff here', TEXT.NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
|
|||||||
@ -11,8 +11,8 @@ class HomeShop extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.add.bitmapText(X, Y, 'gothic', 'Shop Scene', 20);
|
this.add.text(X, Y, 'Shop Scene', TEXT.HEADER);
|
||||||
this.add.bitmapText(X, Y + HEIGHT * 0.1, 'gothic', 'some other stuff here', 20);
|
this.add.text(X, Y + HEIGHT * 0.1, 'rulul', TEXT.NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user