GithubHelp home page GithubHelp logo

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

Stargazers

Tobias avatar Yujun Lin avatar 机智的小鱼君 avatar t-akatsuki avatar Kohki Miki avatar  avatar Shaddock Heath avatar  avatar PanYupin avatar Cuong Nguyen avatar Kino avatar LiXiaYu avatar Lazy Knight avatar oden avatar

Watchers

oden avatar  avatar  avatar Kino avatar  avatar

rmmv.d.ts's Issues

Window_Selectable のサブクラスが itemRect で Rectabgle オブジェクトを返していない

Window_Selectable.prototype.itemRect = function(index) {
var rect = new Rectangle();
// 略
return rect;
};

Window_NameEdit.prototype.itemRect = function(index) {
return {
x: this.left() + index * this.charWidth(),
y: 54,
width: this.charWidth(),
height: this.lineHeight()
};
};

Window_NameInput.prototype.itemRect = function(index) {
return {
x: index % 10 * 42 + Math.floor(index % 10 / 5) * 24,
y: Math.floor(index / 10) * this.lineHeight(),
width: 42,
height: this.lineHeight()
};
};

多分Rectangle が正解だと思うので、そうしようかしら

readonly

get hoge(): any;

みたいな感じで書きたいけど、declare class だと書けないよう。

Lack of pixi.d.ts/lz-string.d.ts/FPSMeter.d.ts

I'm trying use TypeScript to script RMMV, is this project maintain?
I find some error due to the lack of 3 basic .d.ts files as I said at title.
Could you please upload those file?

Whatever, thank you for your share :D


/// <reference path="../pixi/pixi.d.ts"/>
/// <reference path="../lz-string/lz-string.d.ts"/>
/// <reference path="../fpsmeter/FPSMeter.d.ts"/>

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.