--------------------------------------------------------------------
-- e_push_button.lua
-- ボタン押下時の演出
--
-- author IZUMI STUDIO
-- date 2009-08-20 新規作成
--------------------------------------------------------------------
require(".\\scripts\\common")


function createElement_Ring3( _delay, _endFrame )
	local mover = Effect.CreateAnimator_Still(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0 )
	
	local rotator = Effect.CreateAnimator_Still(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0 )
	
	Effect.CreateElement_Ring(
		0,0,0,0,
		0,0,0,0,
		255,255,255,255,
		0,255,255,255,
		0,0,0,0,
		0,0,0,0,
		INTERPOLATION_EASE_OUT,
		0.0, 4.0,
		INTERPOLATION_EASE_OUT,
		0.2, 0.05,
		INTERPOLATION_EASE_OUT,
		30,
		255,
		0.5,
		EFFECT_BLEND_ADD,
		EFFECT_BILLBOARD_NORMAL,
		_delay, _endFrame,
		1,
		mover, rotator )
end

function createElement_Particle2( delay, alpha )
	local vX = math.random()*0.04 -0.02
	local vZ = math.random()*0.04 -0.02
	local arY = math.random()*0.01 + 0.0004
	
	local mover = Effect.CreateAnimator_Dynamics(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0,
		vX*6.0, 0.0, vZ*6.0,
		0.0, 0.2, 0.0,
		-vX*0.12, arY, -vZ*0.12,
		0.0, 0.0, 0.0 )
	
	local rotator = Effect.CreateAnimator_Still(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0 )
	
	w = math.random() * 0.04 + 0.03
	w = w * 4.0
	
	Effect.CreateElement_Circle(
		255,alpha,alpha,alpha,
		255,0,0,0,
		255,0,0,0,
		255,0,0,0,
		w, w,
		INTERPOLATION_LINEAR,
		EFFECT_BLEND_ADD,
		EFFECT_BILLBOARD_NORMAL,
		delay, 10+math.random()*20.0, 1,
		mover, rotator )
end


createElement_Ring3( 0, 30 )
createElement_Ring3( 2, 30 )


