06b11235-f31a-4241-a915-4e424a805bc7.js.map
1.63 KB
{"version":3,"sources":["assets/script/common/gameplay/managers/AlertManager.ts"],"names":[],"mappings":";;;;;;;AAAA,mDAAgD;AAEhD,MAAM,cAAe,SAAQ,EAAE,CAAC,SAAS;IAAzC;;QACI,YAAO,GAAG,IAAI,CAAC;IAOnB,CAAC;IANG,KAAK;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACpG;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,mBAAQ,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 \"../../utils/ResUtils\";\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 }\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}"]}