--------------------------------------------------------------------
-- e_flip_red.lua
-- チップがひっくりかえった時の演出（黄色用）
--
-- author IZUMI STUDIO
-- date 2009-08-20 新規作成
--------------------------------------------------------------------
require(".\\scripts\\common")

function createElement_Ring3()
	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_OUT4,
		0.0, 4.0,
		INTERPOLATION_EASE_OUT4,
		0.2, 0.2,
		INTERPOLATION_EASE_OUT4,
		30,
		255,
		0.5,
		EFFECT_BLEND_ADD,
		EFFECT_BILLBOARD_NORMAL,
		0, 30, 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()

for idx = 1, 20 do
	createElement_Particle2( 0, 255*(16.0-idx/2.0)/16.0 )
end


