20726158-a3e0-4e74-8dc2-160b55760ca0.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. cc._RF.push(module, '20726FYo+BOdI3CFgtVdgyg', 'LayerManager');
  3. // Script/Manager/LayerManager.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  19. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  20. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  21. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  22. return c > 3 && r && Object.defineProperty(target, key, r), r;
  23. };
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. /**
  26. * 图层管理类
  27. * @author xiongjian
  28. * @date 2016/6/27
  29. *
  30. */
  31. var SingleClass_1 = require("./SingleClass");
  32. var FrameworkCfg_1 = require("../../lightMVC/core/FrameworkCfg");
  33. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  34. var LayerManager = /** @class */ (function (_super) {
  35. __extends(LayerManager, _super);
  36. function LayerManager() {
  37. var _this = _super.call(this) || this;
  38. _this.rootLayer = new cc.Node("rootLayer");
  39. //this.rootLayer.addComponent(cc.BlockInputEvents);
  40. cc.game.addPersistRootNode(_this.rootLayer);
  41. _this.rootLayer.width = FrameworkCfg_1.default.DESIGN_RESOLUTION.width;
  42. _this.rootLayer.height = FrameworkCfg_1.default.DESIGN_RESOLUTION.height;
  43. _this.rootLayer.x = 360;
  44. _this.rootLayer.y = 640;
  45. _this.lockLayer = new cc.Node("lockLayer");
  46. _this.rootLayer.addChild(_this.lockLayer);
  47. _this.tipLayer = new cc.Node("tipLayer");
  48. _this.rootLayer.addChild(_this.tipLayer);
  49. return _this;
  50. }
  51. LayerManager = __decorate([
  52. ccclass
  53. ], LayerManager);
  54. return LayerManager;
  55. }(SingleClass_1.SingleClass));
  56. exports.default = LayerManager;
  57. cc._RF.pop();