src/state/stage.js
function () {
            var self = this;

            // add all defined cameras
            this.settings.cameras.forEach(function(camera) {
                self.cameras.set(camera.name, camera);
            });

            // empty or no default camera
            if (this.cameras.has("default") === false) {
                if (typeof default_camera === "undefined") {
                    var width = me.video.renderer.getWidth();
                    var height = me.video.renderer.getHeight();
                    // new default camera instance
                    default_camera = new me.Camera2d(0, 0, width, height);
                }
                this.cameras.set("default", default_camera);
            }

            // reset the game manager
            me.game.reset();

            // call the onReset Function
            this.onResetEvent.apply(this, arguments);
        }
function () {
            var self = this;

            // add all defined cameras
            this.settings.cameras.forEach(function(camera) {
                self.cameras.set(camera.name, camera);
            });

            // empty or no default camera
            if (this.cameras.has("default") === false) {
                if (typeof default_camera === "undefined") {
                    var width = me.video.renderer.getWidth();
                    var height = me.video.renderer.getHeight();
                    // new default camera instance
                    default_camera = new me.Camera2d(0, 0, width, height);
                }
                this.cameras.set("default", default_camera);
            }

            // reset the game manager
            me.game.reset();

            // call the onReset Function
            this.onResetEvent.apply(this, arguments);
        }
function ( ) { var self = this ; // add all defined cameras this . settings . cameras . forEach ( function ( camera ) { self . cameras . set ( camera . name , camera ) ; } ) ; // empty or no default camera if ( this . cameras . has ( "default" ) === false ) { if ( typeof default_camera === "undefined" ) { var width = me . video . renderer . getWidth ( ) ; var height = me . video . renderer . getHeight ( ) ; // new default camera instance default_camera = new me . Camera2d ( 0 , 0 , width , height ) ; } this . cameras . set ( "default" , default_camera ) ; } // reset the game manager me . game . reset ( ) ; // call the onReset Function this . onResetEvent . apply ( this , arguments ) ; }
Object reset function
@ignore
Object reset function