/**
 * @module Fire.Runtime
 */

var NodeWrapper = require('./node');
var NYI = require('./utils').NYI;

/**
 * You should override:
 * - childNodes
 * - getCurrentSceneNode (static)
 * - createEmpty (static)
 *
 * @class SceneWrapper
 * @extends NodeWrapper
 * @constructor
 * @param {RuntimeNode} node - The root node of current stage.
 */
var SceneWrapper = Fire.Class({
    name: 'Fire.Runtime.SceneWrapper',
    extends: NodeWrapper,

    properties: {
        parentNode: {
            get: function () {
                return null;
            },
            set: function () {
                if (FIRE_DEV) {
                    Fire.error("Disallow to set scene's parent.");
                }
            }
        }
    },

    statics: {
        /**
         * Get the current running scene.
         * @method getCurrentSceneNode
         * @return {RuntimeNode}
         * @static
         */
        getCurrentSceneNode: function () {
            NYI();
            return null;
        }
    },

    getSiblingIndex: function () {
        return 0;
    },

    setSiblingIndex: function (index) {
        if (FIRE_DEV) {
            if (index !== 0) {
                Fire.error("Disallow to change scene's sibling index.");
            }
        }
    }
});

module.exports = SceneWrapper;

@@ -130,24 +130,8 @@
 de:%0A
- * - childNodes%0A
  * -
@@ -170,26 +170,106 @@
  - c
-reateEmpty (static
+hildNodes%0A *%0A * You may want to override:%0A * - preloadAssets (so that scene can load synchronously
 )%0A *
@@ -1065,24 +1065,291 @@
   %7D%0A    %7D,%0A%0A
+    /**%0A     * Preload assets before scene loading.%0A     * @method preloadAssets%0A     * @param %7BFire.Asset%5B%5D%7D%0A     * @param %7Bfunction%7D callback%0A     * @param %7Bstring%7D callback.error%0A     */%0A    preloadAssets: function (assets, callback) %7B%0A        callback();%0A    %7D,%0A%0A
     getSibli

add scene.preloadAssets to help scene load synchronously (#8)