Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
this.moveEasing = Phaser.Easing.Linear.None;
/**
* 高度
*
* @type {number}
*/
this.height = game.cache.getImage(this.imageName).height;
/**
* 当前柱子右沿水平位置
*
* @type {number}
*/
this.currEdgeX = config.currEdgeX;
/**
* 最大柱宽
*
* @type {number}
*/
this.maxWidth = this.currEdgeX;
this.updateMinWidth();
this.updateFoodProba();
this.updateSpotMultiple();
this.updateSpotWidth();
this._init();
Hero.prototype.setForPlay = function (useTween, cb) {
var game = this.game;
var x = config.currEdgeX + this.paddingRight;
var y = game.height - config.horizon;
if (useTween) {
var move = game.add.tween(this.sprite)
.to({x: x, y: y}, 200, Phaser.Easing.Linear.None);
move.onComplete.add(
function () {
this.down();
cb && cb();
},
this
);
this._act('walk', true);
move.start();
}
else {