Advertisement
nPhoenix

Phaser 2 - Cheatsheet

Sep 2nd, 2020
1,355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game.Overworld = function () {};
  2. Game.Overworld.prototype.init = function (obj) {};
  3. Game.Overworld.prototype.preload = function () {};
  4. Game.Overworld.prototype.create = function () {};
  5. Game.Overworld.prototype.update = function () {};
  6.  
  7. this.gameInstance = new Phaser.Game(
  8.     width,
  9.     height,
  10.     Phaser.AUTO,
  11.     "game",
  12.     null,
  13.     false,
  14.     false
  15. );
  16. // adicionando states do jogo
  17. this.gameInstance.state.add("overworld", Game.Overworld);
  18. this.gameInstance.state.add("battle", Game.Battle);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement