Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 添加下根柱子
var options = stage.addNext(function () {
// 物件更新
me.stick.update();
foreground.update();
me.isHoldEnabled = true;
});
// 从未取得过食物 并且 下一局有食物, 则提示
if (!global.getFoodCount() && options.hasFood) {
/**
* 食物提示
*
* @type {?Tip}
*/
me.foodTip = new Tip(me.game, {text: config.tips.food});
}
}
);
this.foreground = new Foreground(
game,
{
objects: [this.stage, this.hero, this.stick]
}
);
// 最高分不足2,则给玩法提示
// 不设1,因为首次成功有偶然性,不一定是真会玩
if (global.getHighest() < 2) {
/**
* 玩法提示
*
* @type {?Tip}
*/
this.playTip = new Tip(game, {text: config.tips.play});
}
/**
* 连击
*
* @type {Combo}
*/
this.combo = new Combo(game);
this._bindTouch();
};