/**
 * 音效
 */
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 () {
		speaker.inst = this;
		lwd_g.speaker = speaker;
	},

	//点击按钮
	play_btn: function () {
		lwd_g.snd_mgr.playEffect(this.eff_btn);
	},

	//撒花音效
	play_congratulation: function () {
		lwd_g.snd_mgr.playEffect(this.eff_congratulation);
	},
	//答错
	play_error: function () {
		lwd_g.snd_mgr.playEffect(this.eff_error);
	},
	//答对
	play_good: function (cb) {
		lwd_g.snd_mgr.playEffect(this.eff_good, cb);
	},
	//显示弹窗
	play_showPop: function () {
		lwd_g.snd_mgr.playEffect(this.eff_showPop);
	},
	//游戏开始
	play_start: function (cb) {
		lwd_g.snd_mgr.playEffect(this.eff_start, cb);
	},
});
