Created
February 22, 2018 19:03
-
-
Save triacontane/77f2528f4295de9fece1fe10e71887c8 to your computer and use it in GitHub Desktop.
オーバーライドのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Game_Actor.prototype.die = function() { | |
// this._equipsはアクターオブジェクトにしか存在しない。 | |
// よってGame_Actorにdieメソッドを定義して親であるGame_Battlerのdieメソッドを呼び出す。 | |
Game_Battler.prototype.die.apply(this, arguments); | |
if (this._equips) { | |
this._equips[5].setObject(null); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment