Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // main.js
- //=============================================================================
- function Scene_Example() {
- this.initialize.apply(this, arguments);
- }
- Scene_Example.prototype = Object.create(Stage.prototype);
- Scene_Example.prototype.constructor = Scene_Example;
- Scene_Example.prototype.initialize = function() {
- Stage.prototype.initialize.call(this);
- this._spr = new Sprite();
- this._spr.bitmap = ImageManager.loadFace('Actor1');
- this.addChild(this._spr);
- };
- Scene_Example.prototype.update = function(){
- requestAnimationFrame(this.updateEx.bind(this));
- }
- Scene_Example.prototype.updateEx = function() {
- Graphics.render(this);
- Input.update();
- TouchInput.update();
- }
- // PluginManager.setup($plugins);
- window.onload = function() {
- // var spr = new Sprite();
- // spr.bitmap = ImageManager.loadFace('Actor1', 0);
- // this.addChild(spr);
- //SceneManager.initialize();
- // console.log("Print this");
- var scene = new Scene_Example();
- while(true){
- scene.update();
- }
- // SceneManager.run(Scene_Boot);
- };
Advertisement
Add Comment
Please, Sign In to add comment