text alpha (see through)
This commit is contained in:
parent
3dc6baf2b9
commit
e3277c3478
@ -108,17 +108,16 @@ class PhaserPassives extends Phaser.Scene {
|
||||
|
||||
displayPassiveText(node, pointer) {
|
||||
if (this.nodeText) this.nodeText.destroy();
|
||||
this.nodeText = this.add.text(0, 0, '', {
|
||||
this.nodeText = this.add.text(node.x, node.y, node.text, {
|
||||
fontSize: '20px',
|
||||
fontFamily: 'Arial',
|
||||
color: '#ffffff',
|
||||
backgroundColor: '#222222',
|
||||
}).setPadding(32);
|
||||
this.nodeText.setScale(1 / this.cameras.main.zoom);
|
||||
this.nodeText.setWordWrapWidth(450);
|
||||
this.nodeText.setPosition(node.x, node.y);
|
||||
this.nodeText.setAlpha(0.8);
|
||||
this.nodeText.setOrigin(pointer.x >= 600 ? 1 : 0, pointer.y >= 450 ? 1 : 0);
|
||||
this.nodeText.text = node.text;
|
||||
this.nodeText.setWordWrapWidth(450);
|
||||
this.nodeText.setScale(1 / this.cameras.main.zoom);
|
||||
}
|
||||
|
||||
updatePassives() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user