GithubHelp home page GithubHelp logo

yiyuandian / rmmv.d.ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asteratwood/rmmv.d.ts

0.0 0.0 0.0 320 KB

rpg maker mv d.ts

License: Creative Commons Zero v1.0 Universal

TypeScript 97.32% Shell 2.68%

rmmv.d.ts's Introduction

rmmv.d.ts

rpg maker mv d.ts

Core

  • Window -> _Window(abstract class)

Additional Interfaces

MV

  • AudioParameters
  • BattleLogMethod
  • BattlerAnimation
  • BattleRewards
  • CommandItem
  • ConfigData
  • DatabaseFile
  • Matrix
  • Motion
  • PluginSettings
  • SaveContents
  • SaveFileInfo
  • TextState
  • TouchInputEvents

RPG

  • BaseItem
  • EquipItem
  • MetaData
  • UsableItem

Tips

To add a method to an existing class

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');

To add a processing to a method

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');

rmmv.d.ts's People

Contributors

asteratwood avatar sabakan03 avatar yiyuandian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.