3479de61-4c0d-4115-bcf7-c737ba1e4e03.js.map
1.26 KB
{"version":3,"sources":["assets/script/game/ui/PlaySoundEffectOnEnabled.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuD;AACvD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC;AAG5C;IAAA,IAAqB,wBAAwB,GAA7C,MAAqB,wBAAyB,SAAQ,EAAE,CAAC,SAAS;QAAlE;;YAGI,SAAI,GAAiB,IAA2B,CAAC;QAqBrD,CAAC;QAnBG,MAAM,KAAK,CAAC;QAEZ,KAAK;QAEL,CAAC;QAED,QAAQ;YACJ,IAAI,IAAI,CAAC,IAAI,IAAI,sCAAa,CAAC,WAAW,IAAI,CAAC,EAAE;gBAC7C,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aAC/C;QACL,CAAC;QAED,SAAS;QAET,CAAC;QAID,MAAM,CAAC,EAAE,IAAI,CAAC;KACjB,CAAA;IArBG;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC;0DACgB;IAHhC,wBAAwB;QAD5C,OAAO;OACa,wBAAwB,CAwB5C;IAAD,+BAAC;KAAA;kBAxBoB,wBAAwB","file":"","sourceRoot":"/","sourcesContent":["import { AudioSettings } from \"simba-cc-audio-manager\";\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class PlaySoundEffectOnEnabled extends cc.Component {\n\n @property({ type: cc.AudioClip })\n clip: cc.AudioClip = null as any as cc.AudioClip;\n\n onLoad() { }\n\n start() {\n\n }\n\n onEnable() {\n if (this.clip && AudioSettings.soundVolume != 0) {\n cc.audioEngine.playEffect(this.clip, false);\n }\n }\n\n onDisable() {\n\n }\n\n\n\n update(dt) { }\n}\n\n"]}