Skip to content

Instantly share code, notes, and snippets.

@triacontane
Created August 28, 2021 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triacontane/0a1a948477ad57df77f37ee2cf63d100 to your computer and use it in GitHub Desktop.
Save triacontane/0a1a948477ad57df77f37ee2cf63d100 to your computer and use it in GitHub Desktop.
プレイヤーの前方にあたるイベントを取得
Game_Player.prototype.findStartableEvents = function() {
const x = $gameMap.roundXWithDirection(this.x, this._direction);
const y = $gameMap.roundHalfYWithDirection(this.y, this._direction);
return $gameMap.eventsXy(x, y);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment