"use strict";
cc._RF.push(module, 'ab520ccsGNNxY+Qe3caTQ5o', 'speaker');
// Lwd/script/game/speaker.js

"use strict";

/**
 * 音效
 */
var speaker = cc.Class({
  "extends": cc.Component,
  properties: {
    eff_btn: {
      "default": null,
      type: cc.AudioClip,
      displayName: "点击音效"
    },
    eff_congratulation: {
      "default": null,
      type: cc.AudioClip,
      displayName: "撒花音效"
    },
    eff_error: {
      "default": null,
      type: cc.AudioClip,
      displayName: "点击错误音效"
    },
    eff_good: {
      "default": null,
      type: cc.AudioClip,
      displayName: "点击正确音效"
    },
    eff_showPop: {
      "default": null,
      type: cc.AudioClip,
      displayName: "显示弹窗音效"
    },
    eff_start: {
      "default": null,
      type: cc.AudioClip,
      displayName: "游戏开始音效"
    }
  },
  ctor: function ctor() {
    speaker.inst = this;
    lwd_g.speaker = speaker;
  },
  //点击按钮
  play_btn: function play_btn() {
    lwd_g.snd_mgr.playEffect(this.eff_btn);
  },
  //撒花音效
  play_congratulation: function play_congratulation() {
    lwd_g.snd_mgr.playEffect(this.eff_congratulation);
  },
  //答错
  play_error: function play_error() {
    lwd_g.snd_mgr.playEffect(this.eff_error);
  },
  //答对
  play_good: function play_good(cb) {
    lwd_g.snd_mgr.playEffect(this.eff_good, cb);
  },
  //显示弹窗
  play_showPop: function play_showPop() {
    lwd_g.snd_mgr.playEffect(this.eff_showPop);
  },
  //游戏开始
  play_start: function play_start(cb) {
    lwd_g.snd_mgr.playEffect(this.eff_start, cb);
  }
});

cc._RF.pop();