show coin

This commit is contained in:
WEBXOSS 2017-02-28 23:55:46 +08:00
parent 62eec8e4dd
commit ff57f7b810
2 changed files with 22 additions and 5 deletions

View file

@ -419,12 +419,13 @@ Game.prototype.handleSelectCardId = function (msg) {
return true;
};
Game.prototype.handleConfirm = function (msg) {
// TODO...
Game.prototype.handleCoinChange = function (msg) {
var player = msg.player === this.player.sid ? this.player : this.opponent;
player.coinZone.setText('Coin' + msg.coin);
return true;
};
Game.prototype.handleCoinChange = function (msg) {
Game.prototype.handleConfirm = function (msg) {
if (this.skip) return true;
var title = Localize.labelToDialogTitle('CONFIRM');
var text = Localize('gameText',msg.text);

View file

@ -93,10 +93,17 @@ Game.prototype.initZones = function () {
up: false,
horizontal: true,
center: false,
width: 357,
width: Card.HEIGHT*3,
spacing: -Card.HEIGHT*2/3,
showAmount: true
}),
coinZone: new StackZone({
game: this,
name: 'CoinZone',
x: 471.5,
y: 604.5,
centerText: true,
}),
excludedZone: new StackZone({
game: this,
name: 'ExcludedZone',
@ -218,10 +225,17 @@ Game.prototype.initZones = function () {
up: false,
horizontal: true,
center: false,
width: 357,
width: Card.HEIGHT*3,
spacing: -Card.HEIGHT*2/3,
showAmount: true
}),
coinZone: new StackZone({
game: this,
name: 'CoinZone',
x: 576-471.5,
y: 734-604.5,
centerText: true,
}),
excludedZone: new StackZone({
game: this,
name: 'ExcludedZone',
@ -249,4 +263,6 @@ Game.prototype.initZones = function () {
y: 519,
centerText: true
});
this.player.coinZone.text.font = '14px monospace';
this.opponent.coinZone.text.font = '14px monospace';
};