--------------------------------------------------------------------
-- e_demo_play.lua
-- 表示「DEMO PLAY」
--
-- author IZUMI STUDIO
-- date 2009-09-30 新規作成
--------------------------------------------------------------------

require(".\\scripts\\common")

PROJ_FOV        = 3.1415 * 25.0 / 180.0
PROJ_RADIUS     = 40.0 / math.cos( PROJ_FOV / 2.0 )
PROJ_HALF_WIDTH = PROJ_RADIUS * math.sin( PROJ_FOV / 2.0 )
PROJ_WIDTH      = PROJ_HALF_WIDTH * 2.0

MODEL_SCALE = 1.0 / 400.0 * 1.333 * PROJ_HALF_WIDTH * 1.0
MES_MODEL_NAME = "mes_demo_play"


function createElement_DemoPlay( delay, endFrame, x, y, alpha1, alpha2 )
	
	local mover = Effect.CreateAnimator_Still(
		x, y, 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_Model(
		MES_MODEL_NAME,
		MODEL_SCALE*0.527, MODEL_SCALE*0.527, INTERPOLATION_LINEAR,
		alpha1, alpha2, INTERPOLATION_LINEAR,
		EFFECT_BLEND_NORMAL, 
		delay, endFrame, 1,
		EFFECT_OPTION_SHADOW,
		mover,
		rotator )
end

-- 現れる
createElement_DemoPlay( 
	0, 5,
	(400.0-400.0)/400.0*1.333 * PROJ_HALF_WIDTH,
	(300.0-65.697)/300.0 * PROJ_HALF_WIDTH,
	0.0, 1.0 )

-- しばらくそのまま
createElement_DemoPlay( 
	5, 50,
	(400.0-400.0)/400.0*1.333 * PROJ_HALF_WIDTH,
	(300.0-65.697)/300.0 * PROJ_HALF_WIDTH,
	1.0, 1.0 )

-- 消える
createElement_DemoPlay( 
	55, 5,
	(400.0-400.0)/400.0*1.333 * PROJ_HALF_WIDTH,
	(300.0-65.697)/300.0 * PROJ_HALF_WIDTH,
	1.0, 0.0 )


