--------------------------------------------------------------------
-- e_first.lua
-- 画面サブタイトル（Select Color）を画面内へ
-- 
-- author IZUMI STUDIO
-- date 2009-10-05
--------------------------------------------------------------------
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_NAME = "mes_submenu_mode_select"
SCALE      = 1.0/400.0*1.333*PROJ_HALF_WIDTH

function createElement_Caption_In( _delay, _endFrame, _x, _y )
	
	mover = Effect.CreateAnimator_PointToPoint(
		_x, _y+4.0, 0.0,
		_x, _y, 0.0,
		INTERPOLATION_EASE_OUT,
		20,
		ANIMATOR_LOOP_NO )

	rotator = Effect.CreateAnimator_Still(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0 )
	
	Effect.CreateElement_Model( 
		MODEL_NAME,
		SCALE, SCALE, INTERPOLATION_LINEAR,
		0.0, 1.0, INTERPOLATION_LINEAR,
		EFFECT_BLEND_NORMAL,
		_delay, _endFrame, 1,
		EFFECT_OPTION_SHADOW,
		mover,
		rotator )
end


function createElement_Caption( _delay, _endFrame, _x, _y )
	
	mover = Effect.CreateAnimator_Still(
		_x, _y, 0.0,
		0.0, 0.0, 0.0 )

	rotator = Effect.CreateAnimator_Still(
		0.0, 0.0, 0.0,
		0.0, 0.0, 0.0 )
	
	Effect.CreateElement_Model( 
		MODEL_NAME,
		SCALE, SCALE, INTERPOLATION_LINEAR,
		1.0, 1.0, INTERPOLATION_LINEAR,
		EFFECT_BLEND_NORMAL,
		_delay, _endFrame, 0,
		EFFECT_OPTION_SHADOW,
		mover,
		rotator )
end


createElement_Caption_In( 
	0, 20,
	(40.0-400.0)/400.0*1.333*PROJ_HALF_WIDTH, 
	(300.0-62.4)/300.0*PROJ_HALF_WIDTH )

createElement_Caption( 
	20, 100,
	(40.0-400.0)/400.0*1.333*PROJ_HALF_WIDTH, 
	(300.0-62.4)/300.0*PROJ_HALF_WIDTH )



