"use strict"; cc._RF.push(module, '1c8c29JRFBKR7m8lJHrGmyb', 'viewmanager'); // Scripts/common/viewmanager.js "use strict"; // -------------------------------------------------------------------- // @author: shiraho@syg.com(必填, 创建模块的人员) // @description: // 层级控制器 //
Create: new Date().toISOString() // -------------------------------------------------------------------- window.ViewManager = cc.Class({ cotr: function cotr() {}, properties: { node_list: [], self: null }, statics: { instance: null }, // 储存节点 addSceneNode: function addSceneNode(tag, node) { this.node_list[tag] = node; }, // 将节点add到指定的层 addToSceneNode: function addToSceneNode(node, tag) { if (node) { var scene_node = this.node_list[tag]; if (scene_node) { scene_node.addChild(node); } } }, // 获取指定节点 getSceneNode: function getSceneNode(tag) { if (tag == null) { tag = SCENE_TAG.win; } var node = this.node_list[tag]; return node; } }); ViewManager.getInstance = function () { if (!ViewManager.instance) { ViewManager.instance = new ViewManager(); } return ViewManager.instance; }; module.exports = ViewManager; cc._RF.pop();