06b11235-f31a-4241-a915-4e424a805bc7.js.map
1.84 KB
{"version":3,"sources":["assets/script/common/gameplay/managers/AlertManager.ts"],"names":[],"mappings":";;;;;;;AAAA,yDAA6C;AAC7C,+DAA4D;AAE5D,MAAM,cAAe,SAAQ,EAAE,CAAC,SAAS;IAAzC;;QACI,YAAO,GAAG,IAAI,CAAC;IAQnB,CAAC;IAPG,KAAK;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,yBAAyB;YACzB,oGAAoG;YACpG,+BAAc,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,oBAAoB,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;SACtJ;IACL,CAAC;CACJ;AAED,IAAiB,YAAY,CAS5B;AATD,WAAiB,YAAY;IAClB,KAAK,UAAU,SAAS,CAAC,MAAe,EAAE,IAAsB,EAAE,OAAO,GAAG,IAAI;QACnF,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,IAAI,GAAG,MAAM,4BAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAPqB,sBAAS,YAO9B,CAAA;AACL,CAAC,EATgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAS5B","file":"","sourceRoot":"/","sourcesContent":["import { ResUtils } from \"simba-cc-resutils\";\nimport { AnimationUtils } from \"../../utils/AnimationUtils\";\n\nclass AlertComponent extends cc.Component {\n animate = true;\n start() {\n if (this.animate) {\n // this.node.scale = 0.1;\n // this.node.runAction(cc.sequence(cc.scaleTo(0.3, 1.1), cc.scaleTo(0.2, 0.9), cc.scaleTo(0.2, 1)));\n AnimationUtils.showUIAnim(this.node.getChildByName(\"mainNode\"), { callback: () => { }, maskNodeOpacityValue: 200 }, this.node.getChildByName(\"BG\"))\n }\n }\n}\n\nexport namespace AlertManager {\n export async function showAlert(parent: cc.Node, node: cc.Node | string, animate = true) {\n if (typeof node === \"string\") {\n node = await ResUtils.createWithPrefab(node);\n }\n let comp = node.addComponent(AlertComponent);\n comp.animate = animate;\n node.parent = parent;\n }\n}"]}