/**
 * eff_welldown
 */
var eff_well = cc.Class({
	extends: cc.Component,

	properties: {
		eff_welldown: {
			default: null,
			type: cc.Animation,
			displayName: "撒花特效"
		},
	},

	ctor: function () {
		eff_well.inst = this;
		lwd_g.eff_well = eff_well;
		this._timeoutIds = [];
	},

	//显示特效
	showEff: function () {
		this.node.active = true;
		this.eff_welldown.play();
		//播放撒花音效
		lwd_g.speaker.inst.play_congratulation();
		this._timeoutIds.push( setTimeout(() => {
			this.node.active = false;
		}, 2000))
	},

	onDestroy() {
		this._timeoutIds.forEach(id => {
			clearTimeout(id);
		});
	}
});
