e0228d16-61c1-4e6c-bed6-9d23b09d0598.js.map
1.51 KB
{"version":3,"sources":["assets/script/common/components/UIButton.js"],"names":["AudioSettings","require","cc","Class","editor","CC_EDITOR","menu","Button","properties","clip","AudioClip","start","_onTouchEnded","event","_super","console","log","interactable","soundVolume","audioEngine","playEffect"],"mappings":";;;;;;AAAA,IAAIA,aAAa,GAAGC,OAAO,CAAC,wBAAD,CAA3B;;AACAC,EAAE,CAACC,KAAH,CAAS;AAELC,EAAAA,MAAM,EAAEC,SAAS,IAAI;AACjBC,IAAAA,IAAI,EAAE;AADW,GAFhB;AAML,aAASJ,EAAE,CAACK,MANP;AAQLC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAACP,EAAE,CAACQ;AADA,GARP;AAYLC,EAAAA,KAZK,mBAYI,CAER,CAdI;AAgBLC,EAAAA,aAhBK,yBAgBSC,KAhBT,EAgBe;AAChB,SAAKC,MAAL,CAAYD,KAAZ;;AAEA,QAAI,CAAC,KAAKJ,IAAV,EAAgB;AACZM,MAAAA,OAAO,CAACC,GAAR,CAAY,uBAAZ;AACH,KAFD,MAEO,IAAI,KAAKC,YAAT,EAAuB;AAC1B,UAAIjB,aAAa,CAACkB,WAAd,IAA6B,CAAjC,EACIhB,EAAE,CAACiB,WAAH,CAAeC,UAAf,CAA0B,KAAKX,IAA/B,EAAqC,KAArC;AACP;AACJ,GAzBI,CA2BL;;AA3BK,CAAT","sourceRoot":"/","sourcesContent":["var AudioSettings = require(\"simba-cc-audio-manager\");\ncc.Class({\n\n editor: CC_EDITOR && {\n menu: '自定义UI组件/Button',\n },\n \n extends: cc.Button,\n\n properties: {\n clip:cc.AudioClip,\n },\n\n start () {\n\n },\n\n _onTouchEnded(event){\n this._super(event);\n\n if (!this.clip) {\n console.log(\"current clip is null.\");\n } else if (this.interactable) {\n if (AudioSettings.soundVolume != 0)\n cc.audioEngine.playEffect(this.clip, false)\n }\n },\n\n // update (dt) {},\n});\n"]}