Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

ES6 scene template

trapless

Villager
Xy$
0.00
I noticed an update release note saying newer javascript was supported.

play tested on windows 10 RPG Maker MV 1.6.0

JavaScript:
class Scene_Es6_Template extends Scene_Base {
  //constructor is the new initialize
  constructor() {
    super();
  }

  static get constructor() {
    return Scene_Es6_Template;
  }

  create() {
    super.create();
  }

  start() {
    super.start();
  }

  update() {
    super.update();
  }

  // isReady() {
  // return super.isReady();
  // }

  // isBusy() {
  //   super.isBusy();
  // }

  // prepare(arg) {
  //
  // }

  // terminate() {
  //   super.terminate();
  // }

}


I believe it to work. I made a few logs to console from Scene_Base as a quick check.
I'll report back to this thread if I find otherwise.

EDITS:
- removed - call.(this) ~credit LTN Games
- added - static get constructor()
 
Last edited:

LTN Games

Master Mind
Resource Team
Xy$
0.01
Looking good! But now with ES6 you no longer need to use .call(). Simply use
JavaScript:
super.start()
super.update()
// etc....
 

trapless

Villager
Xy$
0.00
Looking good! But now with ES6 you no longer need to use .call().
Thank you. I had a feeling it was so. I went to bed instead of testing it xD
I'll reflect this in the OP.
[doublepost=1520022570,1519483198][/doublepost]Fixed to work with default SceneManager's use of ".constructor".
 
Top