/** * 图层管理类 * @author xiongjian * @date 2016/6/27 * */ import { SingleClass } from "./SingleClass"; import FrameworkCfg from "../../lightMVC/core/FrameworkCfg"; const { ccclass, property } = cc._decorator; @ccclass export default class LayerManager extends SingleClass { /**根容器*/ private rootLayer: cc.Node; /**锁定动画层*/ public lockLayer: cc.Node; /**提示语层*/ public tipLayer: cc.Node; public constructor() { super(); this.rootLayer = new cc.Node("rootLayer"); //this.rootLayer.addComponent(cc.BlockInputEvents); cc.game.addPersistRootNode(this.rootLayer); this.rootLayer.width = FrameworkCfg.DESIGN_RESOLUTION.width; this.rootLayer.height = FrameworkCfg.DESIGN_RESOLUTION.height; this.rootLayer.x = 360; this.rootLayer.y = 640; this.lockLayer = new cc.Node("lockLayer"); this.rootLayer.addChild(this.lockLayer); this.tipLayer = new cc.Node("tipLayer"); this.rootLayer.addChild(this.tipLayer); } }