--****************************************************************************** --[[ @brief 020_ship @author Yoshikazu KOIDE ]] --****************************************************************************** -- 依存ファイル dofile("game:\\common\\Event\\include\\m020\\ConstValue.lua"); dofile("game:\\common\\airesource\\script\\include\\include.lua"); dofile("game:\\common\\Event\\include\\m020\\PointID.lua"); dofile("game:\\common\\Event\\include\\m020\\EntityID.lua"); -- 本ミッション用定数 TIME_SHIP_MOVES = 300; -- スクリプト初期化 function InitialSetup( context) -- 最初のオペレーションレイヤーを作成する。 AddSharedGlobalValue( context, m020_CONST__NAME_OF_SHARED_GLOBAL_VALUE_REACHED_FLG, m020_CONST__SHIP_ON_THE_POINT_1); --== 移動 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "InitMove", "Move"); DefaultSetup( context, false); end -- 初期化する。 RegistInitializeFuncitonName( "InitialSetup"); --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --****************************************************************************** --[[ @brief 移動 ]] --****************************************************************************** function InitMove() end function Move( context) -- 船動くだけ local flag = GetSharedGlobalValue( context, m020_CONST__NAME_OF_SHARED_GLOBAL_VALUE_REACHED_FLG ); -- if ( flag == 0 ) then -- Op_MoveToPoint( context, OperationIdentifier(1), TIME_SHIP_MOVES, TIME_SHIP_MOVES, 1, nil, m020_ROUTE_1 ); if ( flag == m020_CONST__SHIP_ON_THE_POINT_1 ) then Op_FollowRoute( context, OperationIdentifier(2), TIME_SHIP_MOVES, TIME_SHIP_MOVES, 1, nil, m020_ROUTE_1, m020_ROUTE_2, true ); elseif ( flag == m020_CONST__SHIP_ON_THE_POINT_2 ) then Op_FollowRoute( context, OperationIdentifier(3), TIME_SHIP_MOVES, TIME_SHIP_MOVES, 1, nil, m020_ROUTE_2, m020_ROUTE_3, true ); elseif ( flag == m020_CONST__SHIP_ON_THE_POINT_3 ) then Op_FollowRoute( context, OperationIdentifier(4), TIME_SHIP_MOVES, TIME_SHIP_MOVES, 1, nil, m020_ROUTE_3, m020_ROUTE_4, true ); elseif ( flag == m020_CONST__SHIP_ON_THE_POINT_4 ) then Op_FollowRoute( context, OperationIdentifier(5), TIME_SHIP_MOVES, TIME_SHIP_MOVES, 1, nil, m020_ROUTE_4, m020_PT_ESCAPE_AREA, true ); end end