123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- var t = require;
- var e = module;
- var i = exports;
- var s =
- (this && this.__decorate) ||
- function (t, e, i, s) {
- var o,
- a = arguments.length,
- n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
- else
- for (var r = t.length - 1; 0 <= r; r--)
- (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
- return 3 < a && n && Object.defineProperty(e, i, n), n;
- };
- Object.defineProperty(i, "__esModule", {value: !0});
- const {ccclass: o, property: a} = cc._decorator,
- n = function () {
- return this.node && this._edit;
- };
- e = class {
- constructor() {
- (this.nodeState = null),
- (this._node = null),
- (this._edit = !1),
- (this.x = !1),
- (this.y = !1),
- (this.width = !1),
- (this.height = !1),
- (this.scaleX = !1),
- (this.scaleY = !1),
- (this.active = !1),
- (this.angle = !1),
- (this.opacity = !1),
- (this.color = !1),
- (this.frame = !1),
- (this.str = !1),
- (this.lab_o_c = !1);
- }
- set node(t) {
- if (t) {
- if (t !== this._node) {
- for (const e of this.nodeState.nodeList)
- if (e.node == t) return void cc.warn("已经存在相同的节点,不能重复添加");
- this._node && this.nodeState.removeNode(this._node), (this._node = t);
- }
- } else this.nodeState.removeNodeData(this), (this.nodeState = null);
- }
- get node() {
- return this._node;
- }
- set edit(t) {
- this._edit = t;
- }
- get edit() {
- return this._edit;
- }
- };
- s([a(cc.Node)], e.prototype, "_node", void 0),
- s([a({type: cc.Node})], e.prototype, "node", null),
- s([a()], e.prototype, "_edit", void 0),
- s([a()], e.prototype, "edit", null),
- s([a({visible: n})], e.prototype, "x", void 0),
- s([a({visible: n})], e.prototype, "y", void 0),
- s([a({visible: n})], e.prototype, "width", void 0),
- s([a({visible: n})], e.prototype, "height", void 0),
- s([a({visible: n})], e.prototype, "scaleX", void 0),
- s([a({visible: n})], e.prototype, "scaleY", void 0),
- s([a({visible: n})], e.prototype, "active", void 0),
- s([a({visible: n})], e.prototype, "angle", void 0),
- s([a({visible: n})], e.prototype, "opacity", void 0),
- s([a({visible: n})], e.prototype, "color", void 0),
- s(
- [
- a({
- visible: function () {
- return this.node && this.node.getComponent(cc.Sprite) && this._edit;
- }
- })
- ],
- e.prototype,
- "frame",
- void 0
- ),
- s(
- [
- a({
- visible: function () {
- return this.node && this.node.getComponent(cc.Label) && this._edit;
- }
- })
- ],
- e.prototype,
- "str",
- void 0
- ),
- s(
- [
- a({
- visible: function () {
- return this.node && this.node.getComponent(cc.LabelOutline) && this._edit;
- }
- })
- ],
- e.prototype,
- "lab_o_c",
- void 0
- ),
- (e = s([o("NodeStateData")], e)),
- (i.default = e);
|