...
|
...
|
@@ -49,6 +49,7 @@ function getAwards($container) { |
|
|
|
|
|
|
|
|
$(function() {
|
|
|
var gCoin = window.coin;
|
|
|
var $coin = $('#my-coin');
|
|
|
var $awardsModal = $('#js-awards');
|
|
|
var $playerNum = $('#player-num');
|
...
|
...
|
@@ -65,12 +66,20 @@ $(function() { |
|
|
$playerNum.text(window.joinNum);
|
|
|
}
|
|
|
|
|
|
function setCoins(count) {
|
|
|
$coin.text(coinNumReadable(count));
|
|
|
}
|
|
|
|
|
|
setInterval(function() {
|
|
|
var up = Math.floor(Math.random() * 5);
|
|
|
|
|
|
upPlayers(up);
|
|
|
}, 5000);
|
|
|
|
|
|
game.onstart = function() {
|
|
|
setCoins(gCoin - 20);
|
|
|
};
|
|
|
|
|
|
game.success = function(score, coin) {
|
|
|
var content = score === 0 ? '很遗憾您没有中奖,继续加油哦~' : '<p class="primary">恭喜你获得<span class="award">' + score + '</span>个有货币,请到【我的奖品】中查收</p>';
|
|
|
|
...
|
...
|
@@ -79,7 +88,7 @@ $(function() { |
|
|
content: content
|
|
|
});
|
|
|
|
|
|
$coin.text(coinNumReadable(coin));
|
|
|
setCoins(gCoin = coin);
|
|
|
upPlayers(1);
|
|
|
};
|
|
|
|
...
|
...
|
|