const _gameEventMoveStraight = Game_Event.prototype.moveStraight;
Game_Event.prototype.moveStraight = function(direction) {
_gameEventMoveStraight.call(this, direction);
if (this.isMovementSucceeded()) {
const x = this._x;
const y = this._y;
if (this.isCollidedWithPlayerCharacters(x, y) || $gameMap.eventsXy(x, y).length > 1) {
console.log('is collided')
const events = $gameMap.eventsXyNt(x, y);
const effect = events.some(it => {
//todo 检查是否存在能激活该事件的事件
return true;
});
if (effect) {
this.start();
}
}
}
};
const _gameEventMoveStraight = Game_Event.prototype.moveStraight;
Game_Event.prototype.moveStraight = function(direction) {
_gameEventMoveStraight.call(this, direction);
if (this.isMovementSucceeded()) {
const x = this._x;
const y = this._y;
if (this.isCollidedWithPlayerCharacters(x, y) || $gameMap.eventsXy(x, y).length > 1) {
console.log('is collided')
const events = $gameMap.eventsXyNt(x, y);
const effect = events.some(it => {
//todo 检查是否存在能激活该事件的事件
return true;
});
if (effect) {
this.start();
}
}
}
};