EffectHelpers = {
	SetFibrillationEffector = function(gameObject, fadeAmount, duration)
		fadeAmount = (fadeAmount == nil and 0.04 or fadeAmount)
		duration = (duration == nil and 0.5 or duration)

		assert(fadeAmount < 1.0)

		local eff= CreateAnimationEffector()
		eff:AttachTo(gameObject)
		eff:SetMode(_ANIM_FWD + _ANIM_LOOP)

		eff:SetKey(_TRACK_O, 0.0, 1.0)
		eff:SetKey(_TRACK_O, duration *1.0/4.0, 1.0 - fadeAmount/2.0)
		eff:SetKey(_TRACK_O, duration *2.0/4.0, 1.0)
		eff:SetKey(_TRACK_O, duration *3.0/4.0, 1.0 - fadeAmount)
		eff:SetKey(_TRACK_O, duration *4.0/4.0, 1.0)
		eff:Play();
		return eff;
	end,
	
	CreateHideEffector = function(gameObject, fadeTime, delay)
		fadeTime = fadeTime or CHANGE_OBJECT_OPACITY
		delay = delay or 0
		
		local obj_opacity = gameObject:GetOpacity()
		
		local eff= CreateAnimationEffector()
		eff:AttachTo(gameObject)
		eff:SetDestroysOnEnd(true)
		eff:SetKey(_TRACK_O, 0.0+delay, obj_opacity)
		eff:SetKey(_TRACK_O, fadeTime*obj_opacity+delay, 0)
		eff:Play();
		return eff;
	end,
	
	CreateShowEffector = function(gameObject, fadeTime, delay)
		fadeTime = fadeTime or CHANGE_OBJECT_OPACITY
		delay = delay or 0
		
		local obj_opacity = gameObject:GetOpacity()
		
		local eff= CreateAnimationEffector()
		eff:AttachTo(gameObject)
		eff:SetDestroysOnEnd(true)
		eff:SetKey(_TRACK_O, 0.0+delay, obj_opacity)
		eff:SetKey(_TRACK_O, fadeTime*(1-obj_opacity)+delay, 1)
		eff:Play();
		return eff;
	end,
}
