rpg maker mv d.ts
- Window -> _Window(abstract class)
- AudioParameters
- BattleLogMethod
- BattlerAnimation
- BattleRewards
- CommandItem
- ConfigData
- DatabaseFile
- Matrix
- Motion
- PluginSettings
- SaveContents
- SaveFileInfo
- TextState
- TouchInputEvents
- BaseItem
- EquipItem
- MetaData
- UsableItem
export {};
declare global {
interface Scene_Base {
newMtd(): string;
}
interface DataManagerStatic {
newMtd(): number;
}
}
Scene_Base.prototype.newMtd = function(): string {
return '123';
};
DataManager.newMtd = function(): number {
return 456;
};
//
var scene = new Scene_Base();
var num = scene.newMtd() + DataManager.newMtd().toString();
console.assert(num === '123456');
This is equivalent to alias in RGSS(Ruby).
var mtd = Scene_Base.prototype.newMtd;
Scene_Base.prototype.newMtd = function() {
var a = mtd.call(this);
return a + '123';
};
//
console.assert(new Scene_Base().newMtd() === '123123');