mirror of
https://github.com/webxoss/webxoss-client.git
synced 2024-11-20 05:49:55 +01:00
show coin
This commit is contained in:
parent
62eec8e4dd
commit
ff57f7b810
2 changed files with 22 additions and 5 deletions
7
Game.js
7
Game.js
|
@ -419,12 +419,13 @@ Game.prototype.handleSelectCardId = function (msg) {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Game.prototype.handleConfirm = function (msg) {
|
Game.prototype.handleCoinChange = function (msg) {
|
||||||
// TODO...
|
var player = msg.player === this.player.sid ? this.player : this.opponent;
|
||||||
|
player.coinZone.setText('Coin' + msg.coin);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Game.prototype.handleCoinChange = function (msg) {
|
Game.prototype.handleConfirm = function (msg) {
|
||||||
if (this.skip) return true;
|
if (this.skip) return true;
|
||||||
var title = Localize.labelToDialogTitle('CONFIRM');
|
var title = Localize.labelToDialogTitle('CONFIRM');
|
||||||
var text = Localize('gameText',msg.text);
|
var text = Localize('gameText',msg.text);
|
||||||
|
|
|
@ -93,10 +93,17 @@ Game.prototype.initZones = function () {
|
||||||
up: false,
|
up: false,
|
||||||
horizontal: true,
|
horizontal: true,
|
||||||
center: false,
|
center: false,
|
||||||
width: 357,
|
width: Card.HEIGHT*3,
|
||||||
spacing: -Card.HEIGHT*2/3,
|
spacing: -Card.HEIGHT*2/3,
|
||||||
showAmount: true
|
showAmount: true
|
||||||
}),
|
}),
|
||||||
|
coinZone: new StackZone({
|
||||||
|
game: this,
|
||||||
|
name: 'CoinZone',
|
||||||
|
x: 471.5,
|
||||||
|
y: 604.5,
|
||||||
|
centerText: true,
|
||||||
|
}),
|
||||||
excludedZone: new StackZone({
|
excludedZone: new StackZone({
|
||||||
game: this,
|
game: this,
|
||||||
name: 'ExcludedZone',
|
name: 'ExcludedZone',
|
||||||
|
@ -218,10 +225,17 @@ Game.prototype.initZones = function () {
|
||||||
up: false,
|
up: false,
|
||||||
horizontal: true,
|
horizontal: true,
|
||||||
center: false,
|
center: false,
|
||||||
width: 357,
|
width: Card.HEIGHT*3,
|
||||||
spacing: -Card.HEIGHT*2/3,
|
spacing: -Card.HEIGHT*2/3,
|
||||||
showAmount: true
|
showAmount: true
|
||||||
}),
|
}),
|
||||||
|
coinZone: new StackZone({
|
||||||
|
game: this,
|
||||||
|
name: 'CoinZone',
|
||||||
|
x: 576-471.5,
|
||||||
|
y: 734-604.5,
|
||||||
|
centerText: true,
|
||||||
|
}),
|
||||||
excludedZone: new StackZone({
|
excludedZone: new StackZone({
|
||||||
game: this,
|
game: this,
|
||||||
name: 'ExcludedZone',
|
name: 'ExcludedZone',
|
||||||
|
@ -249,4 +263,6 @@ Game.prototype.initZones = function () {
|
||||||
y: 519,
|
y: 519,
|
||||||
centerText: true
|
centerText: true
|
||||||
});
|
});
|
||||||
|
this.player.coinZone.text.font = '14px monospace';
|
||||||
|
this.opponent.coinZone.text.font = '14px monospace';
|
||||||
};
|
};
|
Loading…
Reference in a new issue