1 line
2.0 KiB
Plaintext
1 line
2.0 KiB
Plaintext
{"version":3,"sources":["assets/scripts/Smoke.ts"],"names":[],"mappings":";;;;;AAAA,oBAAoB;AACpB,4EAA4E;AAC5E,mBAAmB;AACnB,sFAAsF;AACtF,8BAA8B;AAC9B,sFAAsF;;;;;;;;;;;;;;;;;;;;;AAEhF,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAC1C,IAAM,aAAa,GAAG,UAAU,CAAC,EAAE,CAAC;IACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF;IAAmC,yBAAY;IAA/C;QAAA,qEAgBC;QAbG,iBAAW,GAAc,IAAI,CAAC;;IAalC,CAAC;IAZG,oBAAI,GAAJ,UAAK,IAAI;QACL,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC3B,CAAC;IACD,WAAW;IACf,yBAAS,GAAT,UAAU,GAAG,EAAE,KAAK;QACb,KAAK;QACL,IAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACnD,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QAC7B,SAAS,CAAC,QAAQ,GAAG,GAAG,CAAC;QACzB,SAAS,CAAC,KAAK,GAAG,KAAK,GAAG,GAAG,CAAC,CAAE,oBAAoB;IACxD,CAAC;IAXD;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;8CACU;IAHb,KAAK;QADzB,OAAO;OACa,KAAK,CAgBzB;IAAD,YAAC;CAhBD,AAgBC,CAhBkC,EAAE,CAAC,SAAS,GAgB9C;kBAhBoB,KAAK","file":"","sourceRoot":"/","sourcesContent":["// Learn TypeScript:\n// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html\n// Learn Attribute:\n// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html\n// Learn life-cycle callbacks:\n// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html\n\nconst {ccclass, property} = cc._decorator;\nconst RandomInteger = function (e, t) {\n\treturn Math.floor(Math.random() * (t - e) + e);\n};\n@ccclass\nexport default class Smoke extends cc.Component {\n\n @property(cc.Prefab)\n smokePrefab: cc.Prefab = null;\n init(data) {\n this.smokePrefab = data;\n }\n // 合并时的动画效果\n\tshowSmoke(pos, width) {\n // 烟雾\n const smokeNode = cc.instantiate(this.smokePrefab);\n smokeNode.parent = this.node;\n smokeNode.position = pos;\n smokeNode.scale = width / 150; // 适当调整缩放值,使烟雾大小适应屏幕\n }\n\n}\n"]} |