e0228d16-61c1-4e6c-bed6-9d23b09d0598.js
673 Bytes
"use strict";
cc._RF.push(module, 'e02280WYcFObL7WnSOwnQWY', 'UIButton');
// script/common/components/UIButton.js
"use strict";
var AudioSettings = require("simba-cc-audio-manager");
cc.Class({
editor: CC_EDITOR && {
menu: '自定义UI组件/Button'
},
"extends": cc.Button,
properties: {
clip: cc.AudioClip
},
start: function start() {},
_onTouchEnded: function _onTouchEnded(event) {
this._super(event);
if (!this.clip) {
console.log("current clip is null.");
} else if (this.interactable) {
if (AudioSettings.soundVolume != 0) cc.audioEngine.playEffect(this.clip, false);
}
} // update (dt) {},
});
cc._RF.pop();