123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- System.register("chunks:///_virtual/Barricade.ts", ["./rollupPluginModLoBabelHelpers.js", "cc"], (function (t) { var o, i, e, n, r, a, s, c; return { setters: [function (t) { o = t.inheritsLoose }, function (t) { i = t.cclegacy, e = t._decorator, n = t.view, r = t.Tween, a = t.tween, s = t.Vec3, c = t.Component }], execute: function () { var l; i._RF.push({}, "03f715l77hNHIDKFdm2ykJZ", "Barricade", void 0); var d = e.ccclass; e.property, t("Barricade", d("Barricade")(l = function (t) { function i() { for (var o, i = arguments.length, e = new Array(i), n = 0; n < i; n++)e[n] = arguments[n]; return (o = t.call.apply(t, [this].concat(e)) || this).originPosition = new s, o } o(i, t); var e = i.prototype; return e.start = function () { this.originPosition = this.node.getWorldPosition().clone() }, e.tick = function () { var t = this; this.node.getChildByName("Ad").active = !1; var o = n.getVisibleSize(); r.stopAllByTarget(this.node), a(this.node).to(.5, { worldPosition: new s(o.width, this.node.worldPosition.y + 200, 0), angle: 1 * Math.random() > .5 ? 360 : -360 }).call((function () { t.node.active = !1, t.node.angle = 0, t.node.setWorldPosition(t.originPosition) })).start() }, i }(c)) || l); i._RF.pop() } } }));
- System.register("chunks:///_virtual/ButtonComponent.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./GameEvent.ts", "./EventDispatcher.ts", "./CarColorsGlobalTypes.ts", "./GlobalConfig.ts", "./AdvertMgr.ts", "./AliensAudioMgr.ts"], (function (t) { var n, e, i, o, r, a, c, s, u, l, f, E, p, d, h; return { setters: [function (t) { n = t.applyDecoratedDescriptor, e = t.inheritsLoose, i = t.initializerDefineProperty, o = t.assertThisInitialized }, function (t) { r = t.cclegacy, a = t._decorator, c = t.Button, s = t.NodeEventType, u = t.Component }, function (t) { l = t.GameEvent }, function (t) { f = t.EventDispatcher }, function (t) { E = t.TYPE_ITEM }, function (t) { p = t.GlobalConfig }, function (t) { d = t.AdvertMgr }, function (t) { h = t.AliensAudioMgr }], execute: function () { var b, g, v, C, R, m, T; r._RF.push({}, "b9f6afE/WpI+YialF/qvmW4", "ButtonComponent", void 0); var M = a.ccclass, y = a.property; t("ButtonComponent", (b = M("ButtonComponent"), g = y(c), v = y(c), b((m = n((R = function (t) { function n() { for (var n, e = arguments.length, r = new Array(e), a = 0; a < e; a++)r[a] = arguments[a]; return n = t.call.apply(t, [this].concat(r)) || this, i(n, "btRefresh", m, o(n)), i(n, "btMagnet", T, o(n)), n } e(n, t); var r = n.prototype; return r.start = function () { this.addUIEvent() }, r.addUIEvent = function () { var t = this; this.btRefresh.node.on(s.TOUCH_END, (function () { return t.onClickHandler(E.REFRESH) }), this), this.btMagnet.node.on(s.TOUCH_END, (function () { return t.onClickHandler(E.MAGNET) }), this) }, r.onClickHandler = function (t) { h.playOneShot(h.getMusicIdName(3), 1), t == E.REFRESH ? p.isDebug ? f.instance.emit(l.EVENT_REFRESH_COLOR) : d.instance.showReawardVideo((function () { f.instance.emit(l.EVENT_REFRESH_COLOR) })) : t == E.MAGNET && (p.isDebug ? f.instance.emit(l.EVENT_MAGNET) : d.instance.showReawardVideo((function () { f.instance.emit(l.EVENT_MAGNET) }))) }, n }(u)).prototype, "btRefresh", [g], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return null } }), T = n(R.prototype, "btMagnet", [v], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return null } }), C = R)) || C)); r._RF.pop() } } }));
- System.register("chunks:///_virtual/CarBoxComponent.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./GameUtil.ts"], (function (e) { var t, n, r, i, o, a, l, s, c, u, p, f, m, h, y; return { setters: [function (e) { t = e.applyDecoratedDescriptor, n = e.inheritsLoose, r = e.initializerDefineProperty, i = e.assertThisInitialized, o = e.createClass }, function (e) { a = e.cclegacy, l = e._decorator, s = e.Label, c = e.CCInteger, u = e.v2, p = e.find, f = e.tween, m = e.v3, h = e.Component }, function (e) { y = e.GameUtil }], execute: function () { var C, d, v, g, b, w, P, _; a._RF.push({}, "97e7c2lkdxKt7llYHflbATo", "CarBoxComponent", void 0); var x = l.ccclass, A = l.property; e("CarBoxComponent", (C = x("CarBoxComponent"), d = A(s), v = A(c), g = A(c), C((P = t((w = function (e) { function t() { for (var t, n = arguments.length, o = new Array(n), a = 0; a < n; a++)o[a] = arguments[a]; return t = e.call.apply(e, [this].concat(o)) || this, r(t, "label", P, i(t)), r(t, "_num", _, i(t)), t.isAnimateOut = !1, t } return n(t, e), t.prototype.outCarTween = function () { var e = this; console.log("outCarTween 盒子出车"), this.isAnimateOut = !0; var t = this.node.getChildByName("cars").children[0], n = t.angle; this.num -= 1; var r = u(0, 0); if (-90 === n) r = u(1, 0); else if (0 === n) r = u(0, 1); else if (90 === n) r = u(-1, 0); else if (180 === n) r = u(0, -1); else { var i = n - 90; r = u(-Math.cos(i * (Math.PI / 180)), Math.sin(-i * (Math.PI / 180))) } var o = y.getWorldPositionAsVec2(t).add(r.multiplyScalar(300)); t.setParent(p("Canvas/Scene/Levels").children[0], !0), f(t).to(.2, { worldPosition: m(o.x, o.y, 0) }).call((function () { e.isAnimateOut = !1 })).start() }, o(t, [{ key: "num", get: function () { return this._num }, set: function (e) { this._num = e, this.label.string = "" + e } }]), t }(h)).prototype, "label", [d], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return null } }), t(w.prototype, "num", [v], Object.getOwnPropertyDescriptor(w.prototype, "num"), w.prototype), _ = t(w.prototype, "_num", [g], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return 3 } }), b = w)) || b)); a._RF.pop() } } }));
- System.register("chunks:///_virtual/CarCarColorsComponent.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./EventDispatcher.ts", "./tgx.ts", "./UIDef.ts", "./AliensGlobalInstance.ts", "./CarColorsGlobalTypes.ts", "./GameEvent.ts", "./LevelAction.ts", "./LevelMgr.ts", "./GameUtil.ts", "./AliensAudioMgr.ts", "./ResourcePool.ts", "./PinComponent.ts", "./UIMgr.ts"], (function (e) { var t, n, o, i, r, a, s, l, c, u, h, d, p, C, y, f, m, g, v, T, E, P, w, N, _, b, S, M, R, I, D, L; return { setters: [function (e) { t = e.applyDecoratedDescriptor, n = e.inheritsLoose, o = e.initializerDefineProperty, i = e.assertThisInitialized, r = e.createClass }, function (e) { a = e.cclegacy, s = e._decorator, l = e.Enum, c = e.CCFloat, u = e.Input, h = e.find, d = e.instantiate, p = e.tween, C = e.Vec3, y = e.view, f = e.PhysicsSystem2D, m = e.ERaycast2DType, g = e.Component }, function (e) { v = e.EventDispatcher }, null, function (e) { T = e.UI_BattleResult }, function (e) { E = e.AliensGlobalInstance }, function (e) { P = e.CarTypes, w = e.CarDir, N = e.CarColors }, function (e) { _ = e.GameEvent }, function (e) { b = e.LevelAction }, function (e) { S = e.LevelManager }, function (e) { M = e.GameUtil }, function (e) { R = e.AliensAudioMgr }, function (e) { I = e.ResourcePool }, function (e) { D = e.PinComponent }, function (e) { L = e.UIMgr }], execute: function () { var B, F, U, A, O, x, k, z, G, W, V, H; a._RF.push({}, "a6cccMMrm5Pu7sgn7cIa5vc", "CarCarColorsComponent", void 0); var j = s.ccclass, K = s.property, q = s.executeInEditMode; e("CarCarColorsComponent", (B = j("CarCarColorsComponent"), F = K({ type: l(P) }), U = K({ type: l(w) }), A = K({ type: l(N) }), O = K({ type: l(N) }), x = K({ type: c, displayName: "可承载人数" }), B(k = q((G = t((z = function (e) { function t() { for (var t, n = arguments.length, r = new Array(n), a = 0; a < n; a++)r[a] = arguments[a]; return t = e.call.apply(e, [this].concat(r)) || this, o(t, "carType", G, i(t)), o(t, "carDir", W, i(t)), o(t, "_carColor", V, i(t)), o(t, "roleMax", H, i(t)), t.halfLen = 2, t.roleNum = 0, t.isFull = !1, t } n(t, e); var a = t.prototype; return a.onLoad = function () { this.changeColor(), this.carType === P.Minivan ? this.halfLen = 1.6 : this.carType === P.Sedan && (this.halfLen = 1.4), this.roleNum = 0, this.isFull = !1 }, a.start = function () { this.node.on(u.EventType.TOUCH_START, this.onTouchStart, this) }, a.onTouchStart = function (e) { S.instance.levelModel.isEnd || v.instance.emit(_.EVENT_CLICK_CAR, this.node) }, a.changeColor = function () { var e = this; this.node.getChildByName("Color").children.forEach((function (t) { t.name === N[e._carColor] ? t.active = !0 : t.active = !1 })), this.node.getChildByName("Cover").children.forEach((function (t) { t.name === N[e._carColor] ? t.active = !0 : t.active = !1 })), this.node.getChildByName("Cover").active = !0 }, a.addRole = function (e) { var t = this; R.playOneShot(R.getMusicIdName(6), 1); var n = h("Canvas/Scene/Levels"), o = this.node.parent, i = this.node.getChildByName("Seets").children[this.roleNum], r = d(I.instance.get_prefab("pin")), a = e.getWorldPosition().clone(), s = i.getWorldPosition().clone(), l = e.getComponent(D).pin_color; return n.addChild(r), r.getComponent(D).pin_color = l, r.setWorldPosition(a), e.removeFromParent(), e.destroy(), p(r).to(.4, { worldPosition: new C(s.x, s.y, 0) }).call((function () { t.isFull && (o.name = "empty", t.carOutTween()), r.setParent(i), r.setPosition(C.ZERO), r.getComponent(D).pin_color = t.carColor, v.instance.emit(_.EVENT_CHECK_ELEMENT_CHILDREN) })).start(), this.roleNum += 1, this.carType === P.Minivan ? this.isFull = this.roleNum > 5 : this.carType === P.Sedan ? this.isFull = this.roleNum > 3 : this.carType === P.Bus ? this.isFull = this.roleNum > 7 : this.carType === P.Single && (this.isFull = this.roleNum > 0), this.isFull }, a.openCover = function () { var e = this.node.getChildByName("Cover"); e.active = !0; var t = e.scale; p(e).to(.1, { scale: new C(0, t.y, t.z) }, { easing: "quadOut" }).start() }, a.carOut = function () { (this.node.getChildByName("Seets").children.forEach((function (e) { e.children.length })), E.instance.carSysterm.removeCar(this.node), this.node.removeFromParent(), this.node.destroy(), 0 === E.instance.carSysterm.activeCar.size) && (0 == E.instance.levels.children[0].getComponent(b).get_pin_color().length && (L.inst.getUI(T) || (S.instance.levelModel.isWin = !0, S.instance.levelModel.isEnd = !0, L.inst.showUI(T)))) }, a.getRemainSeat = function () { var e = 0; switch (this.carType) { case P.Minivan: e = 6; break; case P.Sedan: e = 4; break; case P.Bus: e = 8; break; case P.Single: e = 1; break; default: throw new Error("Unknown car type: " + this.carType) }return e - this.roleNum }, a.onDestroy = function () { this.node.off(u.EventType.TOUCH_START, this.onTouchStart) }, a.carOutTween = function () { var e = this, t = h("Canvas/Scene/Grounds/PhysicRoodTop/RightPoint").getWorldPosition(), n = this.node.getWorldPosition().clone(); p(this.node).to(.2, { worldPosition: new C(n.x, n.y - 50, n.z) }).call((function () { var n = e.node.getChildByName("Exhaust"), o = e.node.getChildByName("Exhaust1"); n && (n.active = !0, o.active = !0); var i = new C(t.x, t.y, 0), r = new C(0, 0, -1); e.node.lookAt(i, r) })).delay(.1).to(.4, { worldPosition: new C(y.getVisibleSize().x + 200, t.y, 0) }).call((function () { e.carOut() })).start() }, a.checkCollision = function () { var e = M.getWorldPositionAsVec2(this.node), t = M.calculateRayEnd(this.node, 1e3), n = f.instance.raycast(e, t, m.Closest); if (n.length > 0 && 2 == n[0].collider.group) return !0; return !1 }, a.checkCollisionNum = function () { var e = M.getWorldPositionAsVec2(this.node), t = M.calculateRayEnd(this.node, 1e3), n = f.instance.raycast(e, t, m.All); if (n.length > 0) { if (!n[0]) return; if (2 == n[0].collider.group) return n.length - 1 } }, r(t, [{ key: "carColor", get: function () { return this._carColor }, set: function (e) { this._carColor = e, this.changeColor() } }]), t }(g)).prototype, "carType", [F], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return P.Bus } }), W = t(z.prototype, "carDir", [U], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return w.TOP } }), t(z.prototype, "carColor", [A], Object.getOwnPropertyDescriptor(z.prototype, "carColor"), z.prototype), V = t(z.prototype, "_carColor", [O], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return N.Purple } }), H = t(z.prototype, "roleMax", [x], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return 4 } }), k = z)) || k) || k)); a._RF.pop() } } }));
- System.register("chunks:///_virtual/CarCarColorsSysterm.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./CarColorsGlobalTypes.ts", "./CarBoxComponent.ts", "./CarCarColorsComponent.ts", "./EventDispatcher.ts", "./GameEvent.ts", "./AliensGlobalInstance.ts", "./LevelAction.ts", "./PinComponent.ts", "./GameUtil.ts"], (function (n) { var o, t, e, r, a, c, i, s, l, C, f, u, h, p, v, d; return { setters: [function (n) { o = n.inheritsLoose }, function (n) { t = n.cclegacy, e = n._decorator, r = n.find, a = n.PhysicsSystem2D, c = n.ERaycast2DType, i = n.Component }, function (n) { s = n.CarTypes }, function (n) { l = n.CarBoxComponent }, function (n) { C = n.CarCarColorsComponent }, function (n) { f = n.EventDispatcher }, function (n) { u = n.GameEvent }, function (n) { h = n.AliensGlobalInstance }, function (n) { p = n.LevelAction }, function (n) { v = n.PinComponent }, function (n) { d = n.GameUtil }], execute: function () { var m; t._RF.push({}, "b4436AgwkdO/obxQcs6cCbM", "CarCarColorsSysterm", void 0); var y = e.ccclass; e.property, n("CarCarColorsSysterm", y("CarCarColorsSysterm")(m = function (n) { function t() { for (var o, t = arguments.length, e = new Array(t), r = 0; r < t; r++)e[r] = arguments[r]; return (o = n.call.apply(n, [this].concat(e)) || this).activeCar = new Map, o.carSeats = [], o.carBoxMap = [], o.pinColorIndex = 0, o } o(t, n); var e = t.prototype; return e.start = function () { f.instance.on(u.EVENT_REFRESH_COLOR, this.refreshCarColor, this) }, e.onDestroy = function () { f.instance.off(u.EVENT_REFRESH_COLOR, this.refreshCarColor) }, e.addCar = function (n) { var o = this, t = n.getComponent(l); if (t) return this.carBoxMap.push(t), void n.getChildByName("cars").children.forEach((function (n) { o.addCar(n) })); if (this.activeCar.set(n.uuid, n), n.getComponent(C)) { var e = n.getComponent(C).carColor, r = n.getComponent(C).carType, a = 0; for (r === s.Bus ? a = 8 : r === s.Minivan ? a = 6 : r === s.Sedan ? a = 4 : r === s.Single && (a = 1); a--;)this.carSeats.push(e) } }, e.sortCarSeatsByDifficulty = function () { var n = this, o = []; this.activeCar.forEach((function (t, e) { var r = t.getComponent(C); if (r) { var a = n.calculateCarDifficulty(t), c = 0; r.carType === s.Bus ? c = 8 : r.carType === s.Minivan ? c = 6 : r.carType === s.Sedan ? c = 4 : r.carType === s.Single && (c = 1), o.push({ color: r.carColor, difficultyScore: a, seats: c }) } })), o.sort((function (n, o) { return o.difficultyScore - n.difficultyScore })), this.carSeats = [], o.forEach((function (o) { for (var t = 0; t < o.seats; t++)n.carSeats.push(o.color) })) }, e.calculateCarDifficulty = function (n) { var o = n.getComponent(C); return o ? (o.checkCollision() ? 10 : -10) + 2 * o.checkCollisionNum() : 1 / 0 }, e.removeCar = function (n) { this.activeCar.delete(n.uuid) }, e.clearAll = function () { this.activeCar.clear(), this.carBoxMap.length = 0, this.carBoxMap = [], this.carSeats.length = 0, this.carSeats = [], this.pinColorIndex = 0 }, e.removeColorFromSeats = function (n) { var o = this.carSeats.indexOf(n); o > -1 && this.carSeats.splice(o, 1) }, e.refreshCarColor = function () { var n = [], o = r("Canvas/Scene/Levels").children[0].getComponentsInChildren(C); o.forEach((function (o) { o.getComponent(C).checkCollision() || n.push(o) })); var t = h.instance.levels.children[0].getComponent(p).get_all_layer(), e = new Set; if (t.forEach((function (n) { 1 == n.layer_status && n.node.children.forEach((function (n) { n.getComponentsInChildren(v).forEach((function (n) { var o = n.getComponent(v); o.isBlocked || e.add(o.pin_color) })) })) })), 0 !== e.size) { var a = new Map; o.forEach((function (n) { var o = n.carType; a.has(o) || a.set(o, []), a.get(o).push(n) })); for (var c = !1, i = function () { var n = l[s], o = a.get(n.carType); if (!o || o.length < 2) return 1; var t = o.find((function (o) { return o !== n && e.has(o.carColor) })); if (t) { var r = n.carColor; n.carColor = t.carColor, t.carColor = r, e.delete(n.carColor), c = !0 } }, s = 0, l = n; s < l.length; s++)i(); c || console.log("没有合适的车可以进行颜色交换!") } else console.log("没有需要替换的颜色!") }, e.findCanOutCars = function () { var n = []; return r("Canvas/Scene/Levels").children[0].getComponentsInChildren(C).forEach((function (o) { o.getComponent(C).checkCollision() || n.push(o) })), n }, e.checkCarBox = function () { if (0 !== this.carBoxMap.length) for (var n = this.carBoxMap.length; n--;) { var o = this.carBoxMap[n]; if (!o.isAnimateOut) if (o.num <= 0) this.carBoxMap.splice(n, 1); else { var t = o.node, e = d.getWorldPositionAsVec2(t), r = d.calculateRayEnd(t, 300); 0 == a.instance.raycast(e, r, c.Closest).length && o.outCarTween() } } }, e.lateUpdate = function (n) { this.checkCarBox() }, t }(i)) || m); t._RF.pop() } } }));
- System.register("chunks:///_virtual/AliensGlobalInstance.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./ResLoader.ts", "./ResourcePool.ts"], (function (n) { var e, t, r, o, a, s, c, l, i, u; return { setters: [function (n) { e = n.inheritsLoose, t = n.createClass, r = n.asyncToGenerator }, function (n) { o = n.cclegacy, a = n._decorator, s = n.Component, c = n.assetManager, l = n.Prefab }, function (n) { i = n.resLoader }, function (n) { u = n.ResourcePool }], execute: function () { var f, p; o._RF.push({}, "c56747KDyRNqbIGqHCstitb", "AliensGlobalInstance", void 0); var y = a.ccclass; a.property, n("AliensGlobalInstance", y("AliensGlobalInstance")(((p = function (n) { function o() { for (var e, t = arguments.length, r = new Array(t), o = 0; o < t; o++)r[o] = arguments[o]; return (e = n.call.apply(n, [this].concat(r)) || this).levels = null, e.carSysterm = null, e } e(o, n); var a = o.prototype; return a.loadPinPrefab = function () { var n = r((function* () { var n = yield this.loadAsyncPin(); u.instance.set_prefab(n.name, n) })); return function () { return n.apply(this, arguments) } }(), a.loadAsyncPin = function () { var n = r((function* () { return new Promise((function (n, e) { c.getBundle(i.gameBundleName) || (console.error("module_nut is null!"), e()), i.loadAsync(i.gameBundleName, "Prefabs/pin", l).then((function (e) { n(e) })) })) })); return function () { return n.apply(this, arguments) } }(), t(o, null, [{ key: "instance", get: function () { return this._instance || (this._instance = new o), this._instance } }]), o }(s))._instance = void 0, f = p)) || f); o._RF.pop() } } }));
- System.register("chunks:///_virtual/CarColorsGlobalTypes.ts", ["cc"], (function (e) { var r; return { setters: [function (e) { r = e.cclegacy }], execute: function () { var n, l; r._RF.push({}, "aa6c9oh8EtHlrhfkH0+s7i0", "CarColorsGlobalTypes", void 0); e("CarTypes", function (e) { return e[e.Single = 0] = "Single", e[e.Sedan = 1] = "Sedan", e[e.Bus = 2] = "Bus", e[e.Minivan = 3] = "Minivan", e }({})), e("CarDir", function (e) { return e[e.TOP = 0] = "TOP", e[e.BOTTOM = 1] = "BOTTOM", e[e.LEFT = 2] = "LEFT", e[e.RIGHT = 3] = "RIGHT", e }({})); var a = e("CarColors", function (e) { return e[e.Blue = 1] = "Blue", e[e.Green = 2] = "Green", e[e.Red = 3] = "Red", e[e.Cyan = 4] = "Cyan", e[e.Yellow = 5] = "Yellow", e[e.Pink = 6] = "Pink", e[e.Purple = 7] = "Purple", e[e.Brown = 8] = "Brown", e[e.Black = 9] = "Black", e[e.SpriteWhite = 10] = "SpriteWhite", e }({})); e("CarColorLog", ((n = {})[a.Blue] = "蓝色", n[a.Green] = "绿色", n[a.Red] = "红色", n[a.Cyan] = "青色", n[a.Yellow] = "黄色", n[a.Pink] = "粉色", n[a.Purple] = "紫色", n[a.Brown] = "棕色", n[a.Black] = "黑色", n[a.SpriteWhite] = "精灵白色", n)), e("CarColorHex", ((l = {})[a.Blue] = "#1B24F0", l[a.Green] = "#1BF01B", l[a.Red] = "#F0241B", l[a.Cyan] = "#9aeeca", l[a.Yellow] = "#EBF32A", l[a.Pink] = "#EB88BB", l[a.Purple] = "#F32AF3", l[a.Brown] = "#F5A71D", l[a.Black] = "#968a6c", l[a.SpriteWhite] = "#FFFFFF", l)), e("TYPE_ITEM", function (e) { return e[e.REFRESH = 1] = "REFRESH", e[e.MAGNET = 2] = "MAGNET", e }({})); r._RF.pop() } } }));
- System.register("chunks:///_virtual/AliensAudioMgr.ts", ["cc", "./tgx.ts", "./ModuleDef.ts", "./MusicConfigModel.ts", "./AudioMgr.ts"], (function (n) { var i, o, t, u; return { setters: [function (n) { i = n.cclegacy }, null, function (n) { o = n.ModuleDef }, function (n) { t = n.MusicConfigModel }, function (n) { u = n.AudioMgr }], execute: function () { i._RF.push({}, "9ead4gT4hZKLang9kU6TArc", "AliensAudioMgr", void 0); var e = o.MODULE_MOVECAR; n("AliensAudioMgr", function () { function n() { } return n.initilize = function () { this._musicConfigModel = new t }, n.playOneShot = function (n, i) { void 0 === i && (i = 1), u.inst.playOneShot(n, i, e) }, n.play = function (n, i) { void 0 === i && (i = 1), u.inst.play(n, i, e) }, n.getMusicIdName = function (n) { return "Audio/" + this._musicConfigModel.getNameById(n) }, n.stop = function () { u.inst.stop() }, n.pause = function () { u.inst.pause() }, n.resume = function () { u.inst.audioSource.play() }, n }())._musicConfigModel = void 0, i._RF.pop() } } }));
- System.register("chunks:///_virtual/DataModel.ts", ["cc"], (function (r) { var o, l; return { setters: [function (r) { o = r.cclegacy, l = r._decorator }], execute: function () { var e, _; o._RF.push({}, "e74e1M0Ah1NR58LWC1zzzhk", "DataModel", void 0); var n = l.ccclass; l.property, r("DataModel", n("DataModel")(((_ = function () { function r() { } return r.reset_lvl_color_index = function () { r.lvl_color_index = 0 }, r.get_lvl_color = function () { var o = r.lvl_color_arr[r.lvl_color_index]; return r.lvl_color_index += 1, r.lvl_color_index >= r.lvl_color_arr.length && (r.lvl_color_index = 0), o }, r.get_new_group_index = function () { var o = 1 << r.cur_group_index; return r.cur_group_index += 1, r.cur_group_index > 31 && (r.cur_group_index = 3), o }, r }()).lvl_color_arr = [], _.lvl_color_index = 0, _.cur_group_index = 3, e = _)) || e); o._RF.pop() } } }));
- System.register("chunks:///_virtual/ElementAction.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./EventDispatcher.ts", "./CarColorsGlobalTypes.ts", "./HoleComponent.ts", "./PinComponent.ts", "./GameEvent.ts", "./AliensGlobalInstance.ts"], (function (n) { var t, o, e, i, c, r, a, s, l, h, p, d, u, m, f, g, C, E, _, y, v; return { setters: [function (n) { t = n.inheritsLoose }, function (n) { o = n.cclegacy, e = n._decorator, i = n.find, c = n.view, r = n.isValid, a = n.RigidBody2D, s = n.ERigidBody2DType, l = n.PolygonCollider2D, h = n.UIOpacity, p = n.tween, d = n.Sprite, u = n.Color, m = n.Component }, function (n) { f = n.EventDispatcher }, function (n) { g = n.CarColorHex, C = n.CarColors }, function (n) { E = n.HoleComponent }, function (n) { _ = n.PinComponent }, function (n) { y = n.GameEvent }, function (n) { v = n.AliensGlobalInstance }], execute: function () { var I; o._RF.push({}, "4351dbdNGdIZK+vsXwTNKTT", "ElementAction", void 0); var D = e.ccclass; e.property, n("ElementAction", D("ElementAction")(I = function (n) { function o() { for (var t, o = arguments.length, e = new Array(o), i = 0; i < o; i++)e[i] = arguments[i]; return (t = n.call.apply(n, [this].concat(e)) || this).ele_color = void 0, t.parking = void 0, t } t(o, n); var e = o.prototype; return e.start = function () { this.parking = i("Canvas/Scene/Parkings"), f.instance.on(y.EVENT_CHECK_ELEMENT_CHILDREN, this.checkElementChildren, this) }, e.update = function (n) { var t = this.node.getPosition().clone(); this.node.getWorldPosition().y, this.parking.getWorldPosition().y, t.y < -c.getVisibleSize().height && this.removeElement() }, e.removeElement = function () { r(this.node) && (this.node.removeFromParent(), this.node.destroy(), f.instance.emit(y.EVENT_UPDATE_LAYER)) }, e.checkElementChildren = function () { this.node && (0 == this.node.getComponentsInChildren(_).length && (this.node.getComponent(a).type = s.Dynamic)) }, e.get_hole_num = function () { var n = 0; return this.node.children.forEach((function (t) { t.getComponent(E) && n++ })), n }, e.init_element = function (n, t) { this.ele_color = t, this.node.getComponent(a).group = n, this.node.getComponents(l).forEach((function (t) { t.group = n })) }, e.init_pin = function (n, t) { this.node.children.forEach((function (o) { if (o.getComponent(E)) { var e = o.getComponentInChildren(_); if (e) { var i = v.instance.carSysterm.pinColorIndex++; e.init_date(n, t[i], o.getComponent(E)) } } })) }, e.change_pin_color = function (n) { this.node.children.forEach((function (t) { if (t.getComponent(E)) { var o = t.getComponentInChildren(_); o && (o.pin_color = n) } })) }, e.get_pin_color = function (n) { this.node.getComponentsInChildren(_).forEach((function (t) { n.push(t) })) }, e.flash_img = function (n) { this.node.children.forEach((function (n) { if ("img" == n.name && n.getComponent(h)) { var t = .3; n.getComponent(h).opacity = 255, p(n.getComponent(h)).to(t, { opacity: 200 }, { easing: "quadInOut" }).to(t, { opacity: 100 }, { easing: "quadInOut" }).to(t, { opacity: 200 }, { easing: "quadInOut" }).to(t, { opacity: 100 }, { easing: "quadInOut" }).to(t, { opacity: 255 }, { easing: "quadInOut" }).call((function () { n.getComponent(h).opacity = 255 })) } })) }, e.set_img_color = function (n, t) { this.node.children.forEach((function (t) { "img" == t.name && n && (t.getComponent(d).color = (new u).fromHEX(g[n])) })) }, e.set_layer_bg_or_orgin = function (n) { var t = this; n ? (this.node.getComponent(a).type = s.Static, this.node.children.forEach((function (n) { n.active = !1, "img" == n.name && (n.active = !0, t.set_img_color(C.Black, 180)) }))) : (this.node.children.forEach((function (n) { n.active = !0 })), this.set_img_color(C.SpriteWhite, 190), this.node.getComponent(a).type = s.Dynamic) }, e.onDestroy = function () { f.instance.off(y.EVENT_CHECK_ELEMENT_CHILDREN, this.checkElementChildren) }, o }(m)) || I); o._RF.pop() } } }));
- System.register("chunks:///_virtual/GameEvent.ts", ["cc"], (function (E) { var _; return { setters: [function (E) { _ = E.cclegacy }], execute: function () { _._RF.push({}, "a0710IA/bJN5K2C9LYXLCXm", "GameEvent", void 0); var T = E("GameEvent", (function () { })); T.EVENT_UI_INITILIZE = "EVENT_UI_INITILIZE", T.EVENT_GAME_START = "EVENT_GAME_START", T.EVENT_CLICK_CAR = "EVENT_CLICK_CAR", T.EVENT_UPDATE_LAYER = "EVENT_UPDATE_LAYER", T.EVENT_CHECK_LAYER_CHILD = "EVENT_CHECK_LAYER_CHILD", T.EVENT_UPDATE_LEFT_NAIL = "EVENT_UPDATE_LEFT_NAIL", T.EVENT_CHECK_MOVE_TO_CAR = "EVENT_CHECK_MOVE_TO_CAR", T.EVENT_CHECK_ELEMENT_CHILDREN = "EVENT_CHECK_ELEMENT_CHILDREN", T.EVENT_MAGNET = "EVENT_MAGNET", T.EVENT_REFRESH_PIN_COLORS = "EVENT_REFRESH_PIN_COLORS", T.EVENT_REFRESH_COLOR = "EVENT_REFRESH_COLOR", T.EVENT_CHECK_GAME_OVER = "EVENT_CHECK_GAME_OVER", T.EVENT_BATTLE_SUCCESS_LEVEL_UP = "EVENT_BATTLE_SUCCESS_LEVEL_UP", T.EVENT_BATTLE_FAIL_LEVEL_RESET = "EVENT_BATTLE_FAIL_LEVEL_RESET", _._RF.pop() } } }));
- System.register("chunks:///_virtual/GameUtil.ts", ["cc"], (function (n) { var t, e, r, i; return { setters: [function (n) { t = n.cclegacy, e = n.v2, r = n.Rect, i = n.Vec2 }], execute: function () { t._RF.push({}, "c41c2anOIRLkbHSc6iWasZv", "GameUtil", void 0); n("GameUtil", function () { function n() { } return n.formatWeight = function (n) { return n < 1e3 ? n + "KG" : Math.floor(n / 1e3 * 100) / 100 + "T" }, n.hexToRGBA = function (n, t) { return void 0 === t && (t = 255), 3 === (n = n.replace(/^#/, "")).length && (n = n.split("").map((function (n) { return n + n })).join("")), { r: parseInt(n.substring(0, 2), 16), g: parseInt(n.substring(2, 4), 16), b: parseInt(n.substring(4, 6), 16), a: t } }, n.getWorldPositionAsVec2 = function (n) { var t = n.getWorldPosition().clone(); return e(t.x, t.y) }, n.calculateRayEnd = function (n, t) { var r = n.angle, i = e(0, 0); if (-90 === r) i = e(1, 0); else if (0 === r) i = e(0, 1); else if (90 === r) i = e(-1, 0); else if (180 === r) i = e(0, -1); else { var o = r - 90; i = e(-Math.cos(o * (Math.PI / 180)), Math.sin(-o * (Math.PI / 180))) } return this.getWorldPositionAsVec2(n).add(i.multiplyScalar(t)) }, n.isAABBIntersecting = function (n, t) { return !(n.xMax < t.xMin || n.xMin > t.xMax || n.yMax < t.yMin || n.yMin > t.yMax) }, n.isPointInPolygon = function (n, t) { for (var e = !1, r = 0, i = t.length - 1; r < t.length; i = r++) { var o = t[r].x, s = t[r].y, a = t[i].x, u = t[i].y; s > n.y != u > n.y && n.x < (a - o) * (n.y - s) / (u - s) + o && (e = !e) } return e }, n.isCircleIntersectingLine = function (n, t, e, r) { var i = r.subtract(e), o = n.subtract(e).dot(i.normalize()), s = e.add(i.normalize().multiplyScalar(o)); return n.subtract(s).length() <= t }, n.getCircleAABB = function (n) { var t = n.radius, e = n.worldPosition, i = e.x - t, o = e.y - t, s = 2 * t; return new r(i, o, s, s) }, n.getPolygonAABB = function (n) { for (var t = n.worldPoints, e = t[0].x, i = t[0].x, o = t[0].y, s = t[0].y, a = 1; a < t.length; a++) { var u = t[a]; u.x < e && (e = u.x), u.x > i && (i = u.x), u.y < o && (o = u.y), u.y > s && (s = u.y) } return new r(e, o, i - e, s - o) }, n.isPolygonAndCircleIntersecting = function (n, t) { var e = new i(t.node.worldPosition.x, t.node.worldPosition.y), r = t.radius; if (this.isPointInPolygon(e, n.worldPoints)) return !0; for (var o = n.worldPoints, s = 0; s < o.length; s++) { var a = o[s], u = o[(s + 1) % o.length]; if (this.isCircleIntersectingLine(e, r, a, u)) return !0 } return !1 }, n.delay = function (n) { return new Promise((function (t) { return setTimeout(t, 1e3 * n) })) }, n }()); t._RF.pop() } } }));
- System.register("chunks:///_virtual/HoleComponent.ts", ["./rollupPluginModLoBabelHelpers.js", "cc"], (function (o) { var t, n, e, r; return { setters: [function (o) { t = o.inheritsLoose }, function (o) { n = o.cclegacy, e = o._decorator, r = o.Component }], execute: function () { var c; n._RF.push({}, "d8867Cfo51BxqdtXLdvD8Ux", "HoleComponent", void 0); var i = e.ccclass; e.property, o("HoleComponent", i("HoleComponent")(c = function (o) { function n() { return o.apply(this, arguments) || this } t(n, o); var e = n.prototype; return e.start = function () { }, e.hide = function () { }, n }(r)) || c); n._RF.pop() } } }));
- System.register("chunks:///_virtual/LayerAction.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./ElementAction.ts", "./DataModel.ts"], (function (n) { var t, e, o, i, r, c; return { setters: [function (n) { t = n.inheritsLoose }, function (n) { e = n.cclegacy, o = n._decorator, i = n.Component }, function (n) { r = n.ElementAction }, function (n) { c = n.DataModel }], execute: function () { var a; e._RF.push({}, "bcd4a2CGtNE7p9TRN+IJ1yK", "LayerAction", void 0); var l = o.ccclass; o.property, n("LayerAction", l("LayerAction")(a = function (n) { function e() { for (var t, e = arguments.length, o = new Array(e), i = 0; i < e; i++)o[i] = arguments[i]; return (t = n.call.apply(n, [this].concat(o)) || this).layer_group_id = 0, t.layer_color = null, t.layer_status = 0, t } t(e, n); var o = e.prototype; return o.start = function () { }, o.update = function (n) { }, o.get_hole_num = function () { var n = 0; return this.node.children.forEach((function (t) { n += t.getComponent(r).get_hole_num() })), n }, o.init_layer = function () { var n = this; this.layer_group_id = c.get_new_group_index(), this.node.children.forEach((function (t) { t.getComponent(r).init_element(n.layer_group_id, n.layer_color) })) }, o.init_pin = function (n) { var t = this; this.node.children.forEach((function (e) { e.getComponent(r).init_pin(t.layer_group_id, n) })) }, o.change_pin_color = function (n) { this.node.children.forEach((function (t) { t.getComponent(r).change_pin_color(n) })) }, o.get_pin_color = function (n) { this.node.children.forEach((function (t) { t.getComponent(r).get_pin_color(n) })) }, o.get_element_num = function () { return this.node.children.length }, o.set_status = function (n) { var t = this; switch (n) { case 0: this.node.active = !1; break; case 1: this.node.active = !0, 0 == this.layer_status && this.node.children.forEach((function (n) { var t; null == (t = n.getComponent(r)) || t.flash_img() })), 2 == this.layer_status && this.node.children.forEach((function (n) { var t, e; null == (t = n.getComponent(r)) || t.set_layer_bg_or_orgin(!1), null == (e = n.getComponent(r)) || e.flash_img() })); break; case 2: 2 != this.layer_status && (this.node.children.forEach((function (n) { var t; null == (t = n.getComponent(r)) || t.set_layer_bg_or_orgin(!0) })), this.scheduleOnce((function () { t.node.active = !0 }), 1)) }this.layer_status = n }, e }(i)) || a); e._RF.pop() } } }));
- System.register("chunks:///_virtual/Layout_BattleResult.ts", ["./rollupPluginModLoBabelHelpers.js", "cc"], (function (e) { var t, i, r, l, n, a, o, u, c; return { setters: [function (e) { t = e.applyDecoratedDescriptor, i = e.inheritsLoose, r = e.initializerDefineProperty, l = e.assertThisInitialized }, function (e) { n = e.cclegacy, a = e._decorator, o = e.Button, u = e.Node, c = e.Component }], execute: function () { var p, s, b, y, f, g, d, h, w, R, m, z, _, B, N; n._RF.push({}, "24a1aVlAVBATpkR3PjyDH79", "Layout_BattleResult", void 0); var v = a.ccclass, L = a.property; e("Layout_BattleResult", (p = v("Layout_BattleResult"), s = L(o), b = L(o), y = L(u), f = L(u), g = L(u), d = L(u), p((R = t((w = function (e) { function t() { for (var t, i = arguments.length, n = new Array(i), a = 0; a < i; a++)n[a] = arguments[a]; return t = e.call.apply(e, [this].concat(n)) || this, r(t, "btNext", R, l(t)), r(t, "btRestart", m, l(t)), r(t, "light", z, l(t)), r(t, "winNode", _, l(t)), r(t, "loseNode", B, l(t)), r(t, "rain", N, l(t)), t } return i(t, e), t }(c)).prototype, "btNext", [s], { configurable: !0, enumerable: !0, writable: !0, initializer: null }), m = t(w.prototype, "btRestart", [b], { configurable: !0, enumerable: !0, writable: !0, initializer: null }), z = t(w.prototype, "light", [y], { configurable: !0, enumerable: !0, writable: !0, initializer: null }), _ = t(w.prototype, "winNode", [f], { configurable: !0, enumerable: !0, writable: !0, initializer: null }), B = t(w.prototype, "loseNode", [g], { configurable: !0, enumerable: !0, writable: !0, initializer: null }), N = t(w.prototype, "rain", [d], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return null } }), h = w)) || h)); n._RF.pop() } } }));
- System.register("chunks:///_virtual/LevelAction.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./EventDispatcher.ts", "./AliensGlobalInstance.ts", "./CarCarColorsComponent.ts", "./PinComponent.ts", "./GameEvent.ts", "./UnitAction.ts", "./tgx.ts", "./UIDef.ts", "./LevelMgr.ts", "./CarBoxComponent.ts", "./CarColorsGlobalTypes.ts", "./GameUtil.ts", "./GtagMgr.ts", "./GlobalConfig.ts", "./AdvertMgr.ts", "./UIMgr.ts"], (function (n) { var e, t, r, i, o, a, l, s, c, u, h, f, d, g, v, m, p, C, _, y, E, k, I; return { setters: [function (n) { e = n.inheritsLoose, t = n.createForOfIteratorHelperLoose, r = n.asyncToGenerator }, function (n) { i = n.cclegacy, o = n._decorator, a = n.find, l = n.Component }, function (n) { s = n.EventDispatcher }, function (n) { c = n.AliensGlobalInstance }, function (n) { u = n.CarCarColorsComponent }, function (n) { h = n.PinComponent }, function (n) { f = n.GameEvent }, function (n) { d = n.UnitAction }, null, function (n) { g = n.UI_BattleResult }, function (n) { v = n.LevelManager }, function (n) { m = n.CarBoxComponent }, function (n) { p = n.CarTypes }, function (n) { C = n.GameUtil }, function (n) { _ = n.GtagMgr, y = n.GtagType }, function (n) { E = n.GlobalConfig }, function (n) { k = n.AdvertMgr }, function (n) { I = n.UIMgr }], execute: function () { var L; i._RF.push({}, "251b1LD9rlAbJPtECp8FoYX", "LevelAction", void 0); var M = o.ccclass, S = (o.property, function (n) { return n.Empty = "empty", n.InUse = "inuse", n.Locked = "empty-lock", n }(S || {})); n("LevelAction", M("LevelAction")(L = function (n) { function i() { return n.apply(this, arguments) || this } e(i, n); var o = i.prototype; return o.start = function () { this.registerListener(), this.init_level(), this.schedule(this.moveToCar, 1.2), this.reportInformation() }, o.reportInformation = function () { var n = v.instance.levelModel.level; _.inst.doGameDot(y.level_start, { level: n }), E.isDebug || k.instance.showInterstitial() }, o.registerListener = function () { s.instance.on(f.EVENT_UPDATE_LAYER, this.hide_element, this) }, o.get_lvl = function () { var n = this.node.name.split("_"); return Number(n[1].trim()) }, o.get_hole_num = function () { var n = 0; return this.node.children.forEach((function (e) { var t = e.getComponent(d).get_hole_num(); n += t })), n }, o.init_level = function () { var n = r((function* () { for (var n = 0; n < this.node.children.length; n++) { var e = this.node.children[n]; (e.getComponent(u) || e.getComponent(m)) && c.instance.carSysterm.addCar(this.node.children[n]) } this.node.children.forEach((function (n) { n.getComponent(d) && n.getComponent(d).init_layer() })), yield C.delay(.2), c.instance.carSysterm.sortCarSeatsByDifficulty(); var t = c.instance.carSysterm.carSeats; this.node.children.forEach((function (n) { n.getComponent(d) && n.getComponent(d).init_pin(t) })), this.init_parking(), yield C.delay(.2), this.set_default_layer() })); return function () { return n.apply(this, arguments) } }(), o.init_parking = function () { for (var n = a("Canvas/Scene/Parkings").children, e = 0; e < n.length; e++) { var t = n[e]; if (t.name = "empty", e > 3) t.name = "empty-lock" + e, t.getChildByName("Barricade").active = !0, t.getChildByName("Barricade").getChildByName("Ad").active = !0, t.children.slice(1).forEach((function (n) { return n.destroy() })); else t.removeAllChildren() } }, o.set_default_layer = function () { this.get_all_layer().forEach((function (n) { n.set_status(0) })), this.hide_element() }, o.get_all_layer = function () { var n = []; if (this.node) { for (var e = this.node.children.length - 1; e >= 0; e--) { if (this.node.children[e].getComponent(d)) this.node.children[e].getComponent(d).get_layer(n) } return n } }, o.hide_element = function () { var n = r((function* () { var n = 0, e = this.get_all_layer(); if (e) for (var t = 0; t < e.length; t++) { var r = e[t]; r.get_element_num() <= 0 || (++n <= 2 ? 1 != r.layer_status && r.set_status(1) : 3 == n ? 2 != r.layer_status && r.set_status(2) : r.set_status(0)) } })); return function () { return n.apply(this, arguments) } }(), o.getCarSeatCount = function (n) { switch (n) { case p.Sedan: return 4; case p.Minivan: return 6; case p.Bus: return 8; default: return 4 } }, o.check_pins_block = function () { var n = r((function* () { this.get_all_layer().forEach((function (n) { 1 == n.layer_status && n.node.children.forEach((function (n) { n.getComponentsInChildren(h).forEach(r((function* (n) { n.getComponent(h).checkBlocking() }))) })) })) })); return function () { return n.apply(this, arguments) } }(), o.get_pin_color = function () { var n = []; return this.node.getComponentsInChildren(d).forEach((function (e) { e.get_pin_color(n) })), n }, o.moveToCar = function () { var n = r((function* () { if (!v.instance.levelModel.isEnd) { for (var n = a("Canvas/Scene/Parkings").children, e = [], t = !1, i = n.length; i--;)"inuse" !== n[i].name || 1 !== n[i].children.length ? "inuse" !== n[i].name || 2 !== n[i].children.length ? "empty" !== n[i].name || (t = !0) : (e.push(n[i].children[1]), t = !0) : e.push(n[i].children[0]); if (0 !== e.length) { var o = null; this.get_all_layer().forEach((function (n) { 1 == n.layer_status && n.node.children.forEach((function (n) { n.getComponentsInChildren(h).forEach(r((function* (n) { if (!(o = n.getComponent(h)).isBlocked) { for (var t = null, r = e.length; r--;) { var i = e[r], l = i.getComponent(u); if ((!l || !l.isFull) && (l && o && l.carColor === o.pin_color)) { if (null === t) { t = i; continue } 0 === t.getComponent(u).roleNum && (t = i) } } if (null !== t) { var s = o.pin_color; c.instance.carSysterm.removeColorFromSeats(s), t.getComponent(u).addRole(o.node) && t.setParent(a("Canvas/Scene/Levels"), !0) } } }))) })) })), t || this.checkGameOver() } } })); return function () { return n.apply(this, arguments) } }(), o.checkGameOver = function () { var n = r((function* () { var n = this, e = function () { if (!v.instance.levelModel.isEnd && !n.checkParkingEmpty()) { if (n.hasMatchingNails()) return !1; I.inst.getUI(g) || (v.instance.levelModel.isWin = !1, v.instance.levelModel.isEnd = !0, I.inst.showUI(g)) } }; this.unschedule(e), this.scheduleOnce(e, 3) })); return function () { return n.apply(this, arguments) } }(), o.checkParkingEmpty = function () { for (var n = a("Canvas/Scene/Parkings").children, e = 0; e < n.length; e++) { var t = n[e]; if (this.getParkingStatus(e, t) === S.Empty) return !0 } return !1 }, o.getParkingStatus = function (n, e) { if (e.name.startsWith(S.Locked)) { var t = e.getChildByName("Barricade"); return t && !t.active ? S.Empty : S.Locked } if (n <= 3) { if (e.name === S.InUse && e.children.length > 0) return S.InUse } else if (e.name === S.InUse && e.children.length > 1) return S.InUse; return S.Empty }, o.hasMatchingNails = function () { for (var n, e = a("Canvas/Scene/Parkings").children, r = this.get_all_layer(), i = t(e); !(n = i()).done;) { var o = n.value; if ("inuse" === o.name && o.children.length > 0) { var l = o.children[0].getComponent(u); if (!l || l.isFull) continue; for (var s, c = l.carColor, f = t(r); !(s = f()).done;) { var d = s.value; if (1 === d.layer_status) for (var g, v = t(d.node.children); !(g = v()).done;)for (var m, p = g.value.getComponentsInChildren(h), C = t(p); !(m = C()).done;) { var _ = m.value.getComponent(h); if (!_.isBlocked && _.pin_color === c) return !0 } } } } return !1 }, o.onDestroy = function () { s.instance.off(f.EVENT_UPDATE_LAYER, this.hide_element), this.unscheduleAllCallbacks() }, o.update = function (n) { }, i }(l)) || L); i._RF.pop() } } }));
- System.register("chunks:///_virtual/LevelMgr.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./ResLoader.ts", "./EventDispatcher.ts", "./GlobalConfig.ts", "./GameEvent.ts", "./LevelModel.ts", "./GameUtil.ts"], (function (e) { var l, t, n, r, i, o, a, s, v, c, u, d, h, f, L; return { setters: [function (e) { l = e.createClass, t = e.asyncToGenerator }, function (e) { n = e.cclegacy, r = e._decorator, i = e.sys, o = e.assetManager, a = e.Prefab, s = e.instantiate, v = e.find }, function (e) { c = e.resLoader }, function (e) { u = e.EventDispatcher }, function (e) { d = e.GlobalConfig }, function (e) { h = e.GameEvent }, function (e) { f = e.LevelModel }, function (e) { L = e.GameUtil }], execute: function () { var g, m; n._RF.push({}, "d8df8/0FEdJ8ItD7vCAkvpi", "LevelMgr", void 0); var p = r.ccclass; r.property, e("LevelManager", p("LevelManager")(((m = function () { function e() { this.levelModel = null, this.currentLevel = null, this.randomLevel = 0 } var n = e.prototype; return n.initilizeModel = function () { this.levelModel = new f, this.preloadLevel(), this.registerEvent() }, n.registerEvent = function () { u.instance.on(h.EVENT_BATTLE_FAIL_LEVEL_RESET, this.restartLevelHandler, this) }, n.loadAsyncLevel = function () { var e = t((function* (e) { return new Promise((function (l, t) { o.getBundle(c.gameBundleName) || (console.error("module_nut is null!"), t()), console.log("加载的level:", e), c.loadAsync(c.gameBundleName, "Prefabs/CarColorsLevels/lvl_" + e, a).then((function (e) { l(e) })) })) })); return function (l) { return e.apply(this, arguments) } }(), n.preloadLevel = function () { var e = t((function* () { for (var e = o.getBundle(c.gameBundleName), l = 1; l <= d.levelTotal; l++)e.preload("Prefabs/CarColorsLevels/lvl_" + l, a, null, (function () { })) })); return function () { return e.apply(this, arguments) } }(), n.levelUpHandler = function () { var e = t((function* () { this.clearLevelData(), this.upgradeLevel(), yield this.gameStart() })); return function () { return e.apply(this, arguments) } }(), n.restartLevelHandler = function () { var e = t((function* () { this.clearLevelData(), yield this.gameStart() })); return function () { return e.apply(this, arguments) } }(), n.gameStart = function () { var e = t((function* () { var e = this.levelModel.level; yield this.loadLevel(e), yield L.delay(.2), u.instance.emit(h.EVENT_UPDATE_LEFT_NAIL) })); return function () { return e.apply(this, arguments) } }(), n.clearLevelData = function () { this.levelModel.clearLevel() }, n.upgradeLevel = function (e) { if (void 0 === e && (e = 1), this.levelModel.level += e, i.localStorage.setItem("level", this.levelModel.level.toString()), this.levelModel.level > d.levelTotal) { for (var l = this.levelModel.randomLevelList, t = Math.floor(Math.random() * l.length), n = l[t]; n === this.randomLevel && l.length > 1;)n = l[t = Math.floor(Math.random() * l.length)]; this.randomLevel = n, console.log("随机真实关卡level: " + this.randomLevel), this.levelModel.levelConfig.init(this.randomLevel) } else this.levelModel.levelConfig.init(this.levelModel.level); u.instance.emit(h.EVENT_BATTLE_SUCCESS_LEVEL_UP) }, n.loadLevel = function () { var e = t((function* (e) { var l = null; if (this.levelModel.level > d.levelTotal ? (console.log("随机关卡加载 this.randomLevel: " + this.randomLevel), l = yield this.loadAsyncLevel(this.randomLevel)) : l = yield this.loadAsyncLevel(e), this.currentLevel && this.currentLevel.destroy(), l) return this.currentLevel = s(l), v("Canvas/Scene/Levels").removeAllChildren(), v("Canvas/Scene/Levels").addChild(this.currentLevel), this.currentLevel; console.log("关卡预设不存在 level: " + e + ".") })); return function (l) { return e.apply(this, arguments) } }(), l(e, null, [{ key: "instance", get: function () { return this._instance || (this._instance = new e), this._instance } }]), e }())._instance = null, g = m)) || g); n._RF.pop() } } }));
- System.register("chunks:///_virtual/LevelModel.ts", ["cc", "./JsonUtil.ts", "./Tablelevels_config.ts", "./GlobalConfig.ts", "./AliensGlobalInstance.ts"], (function (e) { var t, l, i, n, s, o; return { setters: [function (e) { t = e.cclegacy, l = e.sys }, function (e) { i = e.JsonUtil }, function (e) { n = e.Tablelevels_config }, function (e) { s = e.GlobalConfig }, function (e) { o = e.AliensGlobalInstance }], execute: function () { t._RF.push({}, "2655e5Cq2JG0qLO/zyZVxzy", "LevelModel", void 0); e("TYPE_ITEM", function (e) { return e[e.REVOKE = 1] = "REVOKE", e[e.ADDNUT = 2] = "ADDNUT", e }({})); var a = e("TYPE_GAME_STATE", function (e) { return e[e.GAME_STATE_INIT = 0] = "GAME_STATE_INIT", e[e.GAME_STATE_START = 1] = "GAME_STATE_START", e[e.GAME_STATE_END = 2] = "GAME_STATE_END", e[e.GAME_STATE_RESULT = 3] = "GAME_STATE_RESULT", e[e.GAME_STATE_PAUSE = 4] = "GAME_STATE_PAUSE", e }({})); e("LevelModel", function () { function e() { if (this.levelConfig = void 0, this.level = 1, this.star = 3, this.levelStarsMap = new Map, this.randomLevelList = [], this.isWin = !1, this.isEnd = !1, this.curGameState = a.GAME_STATE_INIT, this.levelConfig = new n, this.getRandomLevelList(), s.isDebug) this.level = s.initilizeLevel; else { var e = l.localStorage.getItem("level"); if (e) if (e > s.levelTotal) { var t = this.randomLevelList[Math.floor(Math.random() * this.randomLevelList.length - 1)]; this.level = t } else this.level = parseInt(e); else this.level = 1 } this.levelConfig.init(this.level) } var t = e.prototype; return t.getRandomLevelList = function () { var e = i.get(n.TableName); e || console.warn("Get level table is fail!"), this.randomLevelList = Object.values(e).filter((function (e) { return 1 == e.random })).map((function (e) { return e.level })) }, t.clearLevel = function () { o.instance.carSysterm.clearAll(), this.isWin = !1, this.isEnd = !1, this.star = 3 }, e }()); t._RF.pop() } } }));
- System.register("chunks:///_virtual/module_movecar", ["./Layout_BattleResult.ts", "./UI_BattleResult_Impl.ts", "./RoosterMoveCar.ts", "./AliensGlobalInstance.ts", "./CarColorsGlobalTypes.ts", "./Barricade.ts", "./ButtonComponent.ts", "./CarBoxComponent.ts", "./CarCarColorsComponent.ts", "./HoleComponent.ts", "./PinComponent.ts", "./RainEffect.ts", "./ElementAction.ts", "./GameEvent.ts", "./GameUtil.ts", "./LayerAction.ts", "./LevelAction.ts", "./AliensAudioMgr.ts", "./LevelMgr.ts", "./DataModel.ts", "./LevelModel.ts", "./MusicConfigModel.ts", "./ResourcePool.ts", "./CarCarColorsSysterm.ts", "./UnitColorsSysterm.ts", "./UnitAction.ts"], (function () { return { setters: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], execute: function () { } } }));
- System.register("chunks:///_virtual/MusicConfigModel.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./Tablemusic_config.ts"], (function (n) { var i, t, e; return { setters: [function (n) { i = n.createClass }, function (n) { t = n.cclegacy }, function (n) { e = n.Tablemusic_config }], execute: function () { t._RF.push({}, "807a0fEbhdDWpvUekcCKkdZ", "MusicConfigModel", void 0); n("MusicConfigModel", function () { function n(n) { void 0 === n && (n = 1), this.config = void 0, this.id = void 0, this.id = n, this.config = new e } return n.prototype.getNameById = function (n) { return void 0 === n && (n = 1), this.config.init(n), this.name }, i(n, [{ key: "content", get: function () { return this.config.content } }, { key: "name", get: function () { return this.config.name } }]), n }()); t._RF.pop() } } }));
- System.register("chunks:///_virtual/PinComponent.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./CarColorsGlobalTypes.ts", "./UnitAction.ts", "./GameUtil.ts"], (function (n) { var e, t, o, r, i, c, a, s, l, p, u, h, f, g, d, y; return { setters: [function (n) { e = n.applyDecoratedDescriptor, t = n.inheritsLoose, o = n.initializerDefineProperty, r = n.assertThisInitialized, i = n.createClass }, function (n) { c = n.cclegacy, a = n._decorator, s = n.Enum, l = n.CircleCollider2D, p = n.Rect, u = n.PolygonCollider2D, h = n.RigidBody2D, f = n.Component }, function (n) { g = n.CarColors }, function (n) { d = n.UnitAction }, function (n) { y = n.GameUtil }], execute: function () { var _, m, C, v, P, B; c._RF.push({}, "ae62fmLVEdJ+qdTnV4YGIwE", "PinComponent", void 0); var L = a.ccclass, I = a.property, w = a.executeInEditMode; n("PinComponent", (_ = L("PinComponent"), m = I({ type: s(g) }), C = I({ type: s(g) }), _(v = w((e((P = function (n) { function e() { for (var e, t = arguments.length, i = new Array(t), c = 0; c < t; c++)i[c] = arguments[c]; return e = n.call.apply(n, [this].concat(i)) || this, o(e, "_pin_color", B, r(e)), e.isBlocked = !1, e.isProcessing = !1, e.pos_hole = null, e } t(e, n); var c = e.prototype; return c.start = function () { }, c.getParentLayer = function (n) { for (var e = n.parent; e;) { var t; if (null != (t = e.parent) && t.getComponent(d)) return e; e = e.parent } return null }, c.getHigherLayers = function (n) { var e = this, t = [], o = n.parent; if (!o) return t; var r = this.getLayerIndex(n.name); return isNaN(r) || o.children.forEach((function (n) { var o = e.getLayerIndex(n.name); !isNaN(o) && o > r && t.push(n) })), t }, c.getLayerIndex = function (n) { var e = n.match(/layer_(\d+)/); return e ? parseInt(e[1], 10) : NaN }, c.getWorldBoundingBox = function () { var n = this.node.getComponent(l); if (!n) return null; var e = n.worldAABB; return new p(e.xMin, e.yMin, e.width, e.height) }, c.checkBlocking = function () { var n = this.node.getComponent(l); if (n) { var e = this.getParentLayer(this.node); if (e) { var t = this.getHigherLayers(e); 0 !== t.length && (this.isBlocked = t.some((function (e) { return e.getComponentsInChildren(u).some((function (e) { return y.isPolygonAndCircleIntersecting(e, n) })) })), this.isBlocked) } else console.warn("无法获取当前钉子所在的 layer") } }, c.init_date = function (n, e, t) { this.pos_hole = t, this.node.getComponent(h).group = n, this._pin_color = e, this.reset_img() }, c.reset_img = function () { this._pin_color ? this.changeColor() : console.log("被return的颜色" + this._pin_color) }, c.changeColor = function () { var n = this; this.node.children.forEach((function (e) { e.name === g[n._pin_color] ? e.active = !0 : e.active = !1 })) }, c.onDestroy = function () { }, i(e, [{ key: "pin_color", get: function () { return this._pin_color }, set: function (n) { this._pin_color = n, this.changeColor() } }]), e }(f)).prototype, "pin_color", [m], Object.getOwnPropertyDescriptor(P.prototype, "pin_color"), P.prototype), B = e(P.prototype, "_pin_color", [C], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return g.Purple } }), v = P)) || v) || v)); c._RF.pop() } } }));
- System.register("chunks:///_virtual/RainEffect.ts", ["./rollupPluginModLoBabelHelpers.js", "cc"], (function (t) { var e, i, n, r, o, s, a, p, c, f, h; return { setters: [function (t) { e = t.applyDecoratedDescriptor, i = t.inheritsLoose, n = t.initializerDefineProperty, r = t.assertThisInitialized, o = t.createForOfIteratorHelperLoose }, function (t) { s = t.cclegacy, a = t._decorator, p = t.Vec3, c = t.UITransform, f = t.randomRangeInt, h = t.Component }], execute: function () { var u, l, d, R, g, v; s._RF.push({}, "5ade39TXTBLhavCAiPa8H8E", "RainEffect", void 0); var y = a.ccclass, D = a.property; t("RainEffect", (u = y("RainEffect"), l = D(p), u((g = e((R = function (t) { function e() { for (var e, i = arguments.length, o = new Array(i), s = 0; s < i; s++)o[s] = arguments[s]; return e = t.call.apply(t, [this].concat(o)) || this, n(e, "speed", g, r(e)), n(e, "resetY", v, r(e)), e.isRaining = !1, e.rainDrops = [], e } i(e, t); var s = e.prototype; return s.start = function () { this.rainDrops = this.node.children, this.resetRainDrops(), this.startRain() }, s.startRain = function () { this.isRaining = !0 }, s.stopRain = function () { this.isRaining = !1 }, s.clearRain = function () { this.stopRain(), this.resetRainDrops() }, s.resetRainDrops = function () { for (var t, e = this.node.getComponent(c).width, i = this.node.getComponent(c).height, n = o(this.rainDrops); !(t = n()).done;) { var r = t.value, s = f(-e / 2, e / 2), a = f(0, i / 2); r.setPosition(s, a, 0) } }, s.update = function (t) { if (this.isRaining) for (var e, i = o(this.rainDrops); !(e = i()).done;) { var n = e.value, r = n.position; r.add3f(this.speed.x * t, this.speed.y * t, this.speed.z * t), n.setPosition(r); var s = this.node.getComponent(c).width, a = this.node.getComponent(c).height; if (n.position.y < -a / 2) { var p = f(-s / 2, a / 2); n.setPosition(p, this.resetY, 0) } } }, s.onDestroy = function () { }, e }(h)).prototype, "speed", [l], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return new p(0, -100, 0) } }), v = e(R.prototype, "resetY", [D], { configurable: !0, enumerable: !0, writable: !0, initializer: function () { return 120 } }), d = R)) || d)); s._RF.pop() } } }));
- System.register("chunks:///_virtual/ResourcePool.ts", ["./rollupPluginModLoBabelHelpers.js", "cc"], (function (e) { var o, r, t; return { setters: [function (e) { o = e.createClass }, function (e) { r = e.cclegacy, t = e._decorator }], execute: function () { var c, n; r._RF.push({}, "ec9c4v/u0pDLZmbQWagshcg", "ResourcePool", void 0); var s = t.ccclass; t.property, e("ResourcePool", s("ResourcePool")(((n = function () { function e() { this.prefab_pool = {} } var r = e.prototype; return r.set_prefab = function (e, o) { this.prefab_pool[e] = o }, r.get_prefab = function (e) { return this.prefab_pool[e] }, o(e, null, [{ key: "instance", get: function () { return this.rp || (this.rp = new e, window.rp = this.rp), this.rp } }]), e }()).rp = void 0, c = n)) || c); r._RF.pop() } } }));
- System.register("chunks:///_virtual/RoosterMoveCar.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./EventDispatcher.ts", "./AliensGlobalInstance.ts", "./CarColorsGlobalTypes.ts", "./CarCarColorsComponent.ts", "./GameEvent.ts", "./LevelMgr.ts", "./CarCarColorsSysterm.ts", "./GameUtil.ts", "./LevelAction.ts", "./GlobalConfig.ts", "./AdvertMgr.ts", "./Barricade.ts", "./AliensAudioMgr.ts", "./tgx.ts", "./UIDef.ts", "./UIMgr.ts"], (function (t) { var e, n, o, i, a, r, s, l, c, d, h, u, f, g, v, C, p, m, y, P, T, w, R, L, E, S, M, N; return { setters: [function (t) { e = t.inheritsLoose, n = t.asyncToGenerator }, function (t) { o = t.cclegacy, i = t._decorator, a = t.find, r = t.NodeEventType, s = t.PhysicsSystem2D, l = t.ERaycast2DType, c = t.Vec3, d = t.tween, h = t.Label, u = t.Component, f = t.Tween }, function (t) { g = t.EventDispatcher }, function (t) { v = t.AliensGlobalInstance }, function (t) { C = t.CarDir }, function (t) { p = t.CarCarColorsComponent }, function (t) { m = t.GameEvent }, function (t) { y = t.LevelManager }, function (t) { P = t.CarCarColorsSysterm }, function (t) { T = t.GameUtil }, function (t) { w = t.LevelAction }, function (t) { R = t.GlobalConfig }, function (t) { L = t.AdvertMgr }, function (t) { E = t.Barricade }, function (t) { S = t.AliensAudioMgr }, null, function (t) { M = t.UI_Setting }, function (t) { N = t.UIMgr }], execute: function () { var b; o._RF.push({}, "981c6qxz65Czq+BDylrIn50", "RoosterMoveCar", void 0); var U = i.ccclass, _ = (i.property, .3); t("RoosterMoveCar", U("RoosterMoveCar")(b = function (t) { function o() { return t.apply(this, arguments) || this } e(o, t); var i = o.prototype; return i.onLoad = function () { S.initilize(), S.play(S.getMusicIdName(2), 1), y.instance.initilizeModel(), v.instance.levels = a("Canvas/Scene/Levels"), v.instance.carSysterm = this.node.getComponent(P), v.instance.loadPinPrefab(), this.registerListener() }, i.start = function () { this.startGame() }, i.startGame = function () { var t = n((function* () { yield y.instance.gameStart() })); return function () { return t.apply(this, arguments) } }(), i.registerListener = function () { var t = this; g.instance.on(m.EVENT_CLICK_CAR, this.onTouchCar, this), g.instance.on(m.EVENT_BATTLE_SUCCESS_LEVEL_UP, this.onUpdateLvl, this), g.instance.on(m.EVENT_UPDATE_LEFT_NAIL, this.onUpdateLeftNail, this), g.instance.on(m.EVENT_CHECK_ELEMENT_CHILDREN, this.onUpdateLeftNail, this); var e = a("Canvas/Scene/Parkings/empty-lock4"), n = a("Canvas/Scene/Parkings/empty-lock5"), o = a("Canvas/Scene/Parkings/empty-lock6"), i = a("Canvas/GameUI/TopLeft/BtnRefresh"), s = a("Canvas/GameUI/TopLeft/BtnSet"); e.on(r.TOUCH_END, (function () { return t.onClickHandler(e) }), this), n.on(r.TOUCH_END, (function () { return t.onClickHandler(n) }), this), o.on(r.TOUCH_END, (function () { return t.onClickHandler(o) }), this), i.on(r.TOUCH_END, (function () { return t.onClickRefresh() }), this), s.on(r.TOUCH_END, (function () { return t.onClickSet() }), this) }, i.onClickHandler = function (t) { S.playOneShot(S.getMusicIdName(3), 1); var e = function () { t.name = "empty", t.getComponentInChildren(E).tick() }; R.isDebug ? e() : L.instance.showReawardVideo((function () { e() })) }, i.onClickRefresh = function () { var t = n((function* () { S.playOneShot(S.getMusicIdName(3), 1), f.stopAll(), y.instance.clearLevelData(), v.instance.carSysterm.clearAll(); var t = y.instance.levelModel.level; y.instance.loadLevel(t), yield T.delay(.2) })); return function () { return t.apply(this, arguments) } }(), i.onClickSet = function () { S.playOneShot(S.getMusicIdName(3), 1), N.inst.isShowing(M) || N.inst.showUI(M) }, i.onTouchCar = function (t) { var e = t, n = e.getComponent(p); if (n) { var o = e.getWorldPosition().clone(), i = T.getWorldPositionAsVec2(e), r = T.calculateRayEnd(e, 1e3), h = s.instance.raycast(i, r, l.Closest); if (h.length > 0) { var u = h[0], f = h[0].collider; if (2 == f.group) { var g = n.halfLen, v = null; v = n.carDir == C.TOP || n.carDir == C.BOTTOM ? new c(0, 1, 0) : new c(1, 0, 0); var m = o.clone().add(v.clone().multiplyScalar(u.fraction - 5 * g)); d(e).to(.1, { worldPosition: m }).to(.1, { worldPosition: o }).call((function () { })).start(), S.playOneShot(S.getMusicIdName(5), 1) } else { var y = this.getEmptyParkPoint(); if (null === y) return void console.log("没有车位了"); var P = h[0].point, w = d(e); if ("PhysicRoodTop" === f.node.name) this.hitPointTween2(e, P, w, f.node, y), this.topRoadTween(e, y, w); else if ("PhysicRoodLeft" === f.node.name) { a("Canvas/Scene/Grounds/PhysicRoodTop/LeftPoint"); this.hitPointTween2(e, P, w, f.node), this.leftRoadTween(e, w), this.leftTopToRight(e, y, w), this.topRoadTween(e, y, w) } else if ("PhysicRoodRight" === f.node.name) { a("Canvas/Scene/Grounds/PhysicRoodTop/RightPoint"); this.hitPointTween2(e, P, w, f.node), this.rightRoadTween(e, w), this.rightTopToleft(e, y, w), this.topRoadTween(e, y, w) } else if ("PhysicRoodBottom" === f.node.name) { var R = a("Canvas/Scene/Grounds/PhysicRoodBottom"), L = R.getChildByName("LeftPoint"), E = R.getChildByName("RightPoint"), M = L.getWorldPosition().subtract(o).normalize(), N = E.getWorldPosition().subtract(o).normalize(); if (Math.abs(M.x) < Math.abs(N.x)) { var b = a("Canvas/Scene/Grounds/PhysicRoodBottom/LeftPoint"); this.hitPointTween2(e, P, w, f.node), this.bottomRoadTween(e, b, w), this.leftRoadTween(e, w), this.leftTopToRight(e, y, w) } else { var U = a("Canvas/Scene/Grounds/PhysicRoodBottom/RightPoint"); this.hitPointTween2(e, P, w, f.node), this.bottomRoadTween(e, U, w), this.rightRoadTween(e, w), this.rightTopToleft(e, y, w) } this.topRoadTween(e, y, w) } y.name = "inuse", w.call((function () { var t = e.getChildByName("Exhaust"), n = e.getChildByName("Exhaust1"); t && (t.active = !1, n.active = !1), e.setParent(y, !0) })).start() } } else console.log("未检测到碰撞物体") } }, i.onUpdateLeftNail = function () { this.updateScrewsLen(), this.onUpdateLvl() }, i.updateScrewsLen = function () { var t = a("Canvas/Scene/Levels"), e = a("Canvas/GameUI/Pai/LbScrews").getComponent(h), n = t.children; if (!(n.length <= 0)) { var o = n[0].getComponent(w).get_pin_color(); e.string = "" + o.length } }, i.onUpdateLvl = function () { var t = a("Canvas/GameUI/TitleLvl/LbLvl").getComponent(h), e = y.instance.levelModel.level; t.string = "" + e }, i.getEmptyParkPoint = function () { for (var t = a("Canvas/Scene/Parkings").children, e = 0; e < t.length; e++)if ("empty" === t[e].name) return t[e]; return null }, i.hitPointTween2 = function (t, e, n, o, i) { void 0 === o && (o = null), S.playOneShot(S.getMusicIdName(4), 1); var a = t.getChildByName("Exhaust"), r = t.getChildByName("Exhaust1"); a && (a.active = !0, r.active = !0); var s = new c(e.x, e.y, 0); n.to(_, { worldPosition: s }, { easing: "quadInOut" }).call((function () { var e, n = t.getWorldPosition().clone(), a = s.subtract(n).normalize(); if (Math.abs(a.x) > Math.abs(a.y)) { var r = o.getChildByName("LeftPoint"), l = o.getChildByName("RightPoint"), d = r.getWorldPosition().subtract(n).normalize(), h = l.getWorldPosition().subtract(n).normalize(); e = Math.abs(d.x) < Math.abs(h.x) ? new c(0, 0, 1) : new c(0, 0, -1) } else if ("PhysicRoodBottom" == o.name || "PhysicRoodTop" == o.name) if ("PhysicRoodTop" == o.name) { var u = t.getWorldPosition().clone(), f = i.getWorldPosition().clone(); e = u.subtract(f).normalize().x > 0 ? new c(0, 0, 1) : new c(0, 0, -1) } else { var g = o.getChildByName("LeftPoint"), v = o.getChildByName("RightPoint"), C = g.getWorldPosition().subtract(s).normalize(), p = v.getWorldPosition().subtract(s).normalize(); e = Math.abs(C.x) <= Math.abs(p.x) ? new c(0, 0, 1) : new c(0, 0, -1) } else e = a.y > 0 ? new c(0, -1, 0) : new c(0, 1, 0); t.lookAt(s, e) })).start() }, i.topRoadTween = function (t, e, n) { var o = e.worldPosition.clone(); n.to(_, { worldPosition: new c(o.x, o.y - 70, o.z) }).delay(.1).to(_, { eulerAngles: new c(0, 0, 0) }).delay(.1).to(_, { worldPosition: e.worldPosition }).call((function () { t.getComponent(p).openCover() })) }, i.leftTopToRight = function (t, e, n) { n.to(.2, { eulerAngles: new c(0, 0, -90) }).start() }, i.leftRoadTween = function (t, e) { var n = a("Canvas/Scene/Grounds/PhysicRoodTop/LeftPoint"); e.to(_, { worldPosition: n.getWorldPosition() }).call((function () { var e = t.forward.clone(); d(e).to(.1, { x: -1, y: 0, z: 0 }, { onUpdate: function () { t.forward = e } }).start() })).delay(.1) }, i.rightTopToleft = function (t, e, n) { n.to(.2, { eulerAngles: new c(0, 0, 90) }).start() }, i.rightRoadTween = function (t, e) { var n = a("Canvas/Scene/Grounds/PhysicRoodTop/RightPoint"); e.to(_, { worldPosition: n.getWorldPosition() }).call((function () { var e = t.forward.clone(); d(e).to(.1, { x: 1, y: 0, z: 0 }, { onUpdate: function () { t.forward = e } }).start() })).delay(.1) }, i.bottomRoadTween = function (t, e, n) { n.to(_, { worldPosition: new c(e.getWorldPosition().x, e.getWorldPosition().y + 20, e.getWorldPosition().z) }).call((function () { var e = t.forward.clone(); d(e).to(.1, { x: 0, y: 0, z: 1 }, { onUpdate: function () { t.forward = e } }).start() })).delay(.1) }, o }(u)) || b); o._RF.pop() } } }));
- System.register("chunks:///_virtual/UI_BattleResult_Impl.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./tgx.ts", "./GameUILayers.ts", "./UIDef.ts", "./Layout_BattleResult.ts", "./GtagMgr.ts", "./LevelMgr.ts", "./AliensAudioMgr.ts", "./RainEffect.ts", "./ModuleContext.ts"], (function (t) { var e, n, i, s, a, o, l, r, u, c, f, h, d, v, g, m; return { setters: [function (t) { e = t.inheritsLoose }, function (t) { n = t.cclegacy, i = t.v3, s = t.tween, a = t.Vec3, o = t.Tween, l = t.isValid }, null, function (t) { r = t.GameUILayers }, function (t) { u = t.UI_BattleResult }, function (t) { c = t.Layout_BattleResult }, function (t) { f = t.GtagMgr, h = t.GtagType }, function (t) { d = t.LevelManager }, function (t) { v = t.AliensAudioMgr }, function (t) { g = t.RainEffect }, function (t) { m = t.ModuleContext }], execute: function () { n._RF.push({}, "60a4313NlFJpqUrSRZVVrBe", "UI_BattleResult_Impl", void 0); var w = t("UI_BattleResult_Impl", function (t) { function n() { var e; return (e = t.call(this, "Prefabs/UI/Result/UI_BattleResult", r.POPUP, c) || this).rewardBase = 0, e.rewardAdditional = 0, e.timeoutIds = [], e.win = !0, e } e(n, t); var u = n.prototype; return u.getRes = function () { return [] }, u.onCreated = function () { var t = this; this.win = d.instance.levelModel.isWin; var e = this.win ? 7 : 8; v.playOneShot(v.getMusicIdName(e), 1); var n = this.layout; this.onButtonEvent(n.btNext, (function () { t.onClickRewardBase() })), this.onButtonEvent(n.btRestart, (function () { t.onClickRewardBase() })), n.winNode.active = this.win, n.loseNode.active = !this.win, this.win || this.rainEffect(), this.rotationLight(); var i = d.instance.levelModel.level; f.inst.doGameDot(h.level_end, { level: i }) }, u.rainEffect = function () { this.layout.rain.getComponent(g).startRain() }, u.rotationLight = function () { if (this.win) { var t = this.layout.light; t.eulerAngles = i(0, 0, 0), s(t).repeatForever(s().to(5, { eulerAngles: new a(0, 0, 360) }, { easing: "linear" }).call((function () { t.eulerAngles = new a(0, 0, 0) }))).start() } }, u.emitEvent = function () { this.win ? d.instance.levelUpHandler() : d.instance.restartLevelHandler() }, u.onClickRewardBase = function () { this.destoryMyself(), this.emitEvent() }, u.clearAllTimeouts = function () { this.timeoutIds.forEach((function (t) { return clearTimeout(t) })), this.timeoutIds = [] }, u.destoryMyself = function () { o.stopAllByTarget(this.node), l(this.node) && (this.node.removeFromParent(), this.hide()), this.clearAllTimeouts() }, n }(u)); m.attachImplClass(u, w), n._RF.pop() } } }));
- System.register("chunks:///_virtual/UnitAction.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./LayerAction.ts", "./EventDispatcher.ts", "./GameEvent.ts"], (function (n) { var t, e, o, i, r, c, h; return { setters: [function (n) { t = n.inheritsLoose }, function (n) { e = n.cclegacy, o = n._decorator, i = n.Component }, function (n) { r = n.LayerAction }, function (n) { c = n.EventDispatcher }, function (n) { h = n.GameEvent }], execute: function () { var a; e._RF.push({}, "b886bGpOV5EmZwcCJSzq1Ua", "UnitAction", void 0); var u = o.ccclass; o.property, n("UnitAction", u("UnitAction")(a = function (n) { function e() { return n.apply(this, arguments) || this } t(e, n); var o = e.prototype; return o.start = function () { c.instance.on(h.EVENT_UPDATE_LAYER, this.onCheckLayerChild, this) }, o.onCheckLayerChild = function () { this.node && this.node.children.forEach((function (n) { n.children.length <= 0 && (console.log("layer层级没有element元素了,移除layer层----"), n.removeFromParent(), n.destroy()) })) }, o.update = function (n) { }, o.init_layer = function () { this.node.children.forEach((function (n) { n.getComponent(r).init_layer() })) }, o.init_pin = function (n) { this.node.children.forEach((function (t) { t.getComponent(r).init_pin(n) })) }, o.get_pin_color = function (n) { for (var t = this.node.children.length - 1; t >= 0; t--) { this.node.children[t].getComponent(r).get_pin_color(n) } return n }, o.get_layer = function (n) { for (var t = this.node.children.length - 1; t >= 0; t--) { var e = this.node.children[t].getComponent(r); e && n.push(e) } return n }, o.get_hole_num = function () { var n = 0; return this.node.children.forEach((function (t) { var e = t.getComponent(r).get_hole_num(); n += e })), n }, e }(i)) || a); e._RF.pop() } } }));
- System.register("chunks:///_virtual/UnitColorsSysterm.ts", ["./rollupPluginModLoBabelHelpers.js", "cc", "./CarCarColorsComponent.ts", "./PinComponent.ts", "./AliensGlobalInstance.ts", "./EventDispatcher.ts", "./GameEvent.ts", "./LevelAction.ts"], (function (n) { var e, t, o, r, i, s, a, c, l, h, C, f; return { setters: [function (n) { e = n.inheritsLoose, t = n.asyncToGenerator }, function (n) { o = n.cclegacy, r = n._decorator, i = n.find, s = n.Component }, function (n) { a = n.CarCarColorsComponent }, function (n) { c = n.PinComponent }, function (n) { l = n.AliensGlobalInstance }, function (n) { h = n.EventDispatcher }, function (n) { C = n.GameEvent }, function (n) { f = n.LevelAction }], execute: function () { var u; o._RF.push({}, "66d66fr3PFGY6ppg1RH9ywh", "UnitColorsSysterm", void 0); var p = r.ccclass; r.property, n("UnitColorsSysterm", p("UnitColorsSysterm")(u = function (n) { function o() { for (var e, t = arguments.length, o = new Array(t), r = 0; r < t; r++)o[r] = arguments[r]; return (e = n.call.apply(n, [this].concat(o)) || this).findPins = [], e.selectedCar = null, e } e(o, n); var r = o.prototype; return r.start = function () { this.registerEvent() }, r.registerEvent = function () { h.instance.on(C.EVENT_MAGNET, this.onMagnet, this) }, r.onMagnet = function () { this.findPinsCar(), this.moveToCar() }, r.findPinsCar = function () { for (var n = this, e = l.instance.levels.children[0], o = i("Canvas/Scene/Parkings").children, r = [], s = o.length; s--;)"inuse" !== o[s].name || 1 !== o[s].children.length ? "inuse" !== o[s].name || 2 !== o[s].children.length ? o[s].name : r.push(o[s].children[1]) : r.push(o[s].children[0]); if (r.length <= 0) console.log("停车场没有车"); else { this.selectedCar = r[r.length - 1]; var h = e.getComponent(f).get_all_layer().reverse(), C = 0; h.forEach((function (e) { e.node.children.forEach((function (e) { e.getComponentsInChildren(c).forEach(t((function* (e, t) { var o = e.getComponent(c), r = n.selectedCar.getComponent(a), i = r.getRemainSeat(); o.pin_color == r.carColor && ++C <= i && n.findPins.push(o.node) }))) })) })) } }, r.moveToCar = function () { var n = this; null != this.selectedCar && this.findPins.forEach((function (e) { n.selectedCar.getComponent(a).addRole(e) })), this.clearpinsCar() }, r.findCanOutCars = function () { var n = []; i("Canvas/Scene/Levels").children[0].getComponentsInChildren(a).forEach((function (e) { var t = e.getComponent(a); if (!t.checkCollision()) for (var o = t.getRemainSeat(), r = 0; r < o; r++)n.push(t.carColor) })); for (var e = i("Canvas/Scene/Parkings").children, t = e.length; t--;)if ("inuse" !== e[t].name || 1 !== e[t].children.length) if ("inuse" !== e[t].name || 2 !== e[t].children.length); else for (var o = e[t].children[1].getComponent(a), r = o.getRemainSeat(), s = 0; s < r; s++)n.push(o.carColor); else for (var c = e[t].children[0].getComponent(a), l = c.getRemainSeat(), h = 0; h < l; h++)n.push(c.carColor); return n }, r.clearpinsCar = function () { this.selectedCar = null, this.findPins = [] }, o }(s)) || u); o._RF.pop() } } }));
- (function (r) {
- r('virtual:///prerequisite-imports/module_movecar', 'chunks:///_virtual/module_movecar');
- })(function (mid, cid) {
- System.register(mid, [cid], function (_export, _context) {
- return {
- setters: [function (_m) {
- var _exportObj = {};
- for (var _key in _m) {
- if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
- }
- _export(_exportObj);
- }],
- execute: function () { }
- };
- });
- });
|