加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 yang1zhi 于 2017-11-5 21:02 编辑
Game_CharacterBase.prototype.updateMove = function() { //移动速度为0时不移动 if (this._moveSpeed === 0) { this.setPosition(this._realX,this._realY); } if (this._x < this._realX) { this._realX = Math.max(this._realX - this.distancePerFrame(), this._x); } if (this._x > this._realX) { this._realX = Math.min(this._realX + this.distancePerFrame(), this._x); } if (this._y < this._realY) { this._realY = Math.max(this._realY - this.distancePerFrame(), this._y); } if (this._y > this._realY) { this._realY = Math.min(this._realY + this.distancePerFrame(), this._y); } if (!this.isMoving()) { this.refreshBushDepth(); } };
Game_CharacterBase.prototype.updateMove = function() {
//移动速度为0时不移动
if (this._moveSpeed === 0) {
this.setPosition(this._realX,this._realY);
}
if (this._x < this._realX) {
this._realX = Math.max(this._realX - this.distancePerFrame(), this._x);
}
if (this._x > this._realX) {
this._realX = Math.min(this._realX + this.distancePerFrame(), this._x);
}
if (this._y < this._realY) {
this._realY = Math.max(this._realY - this.distancePerFrame(), this._y);
}
if (this._y > this._realY) {
this._realY = Math.min(this._realY + this.distancePerFrame(), this._y);
}
if (!this.isMoving()) {
this.refreshBushDepth();
}
};
//然后这个是控制移动速度的
$gamePlayer.setMoveSpeed(0);
|