--****************************************************************************** --[[ @brief テスト用 ]] --****************************************************************************** -- 依存ファイル dofile("game:\\common\\airesource\\script\\include\\include.lua"); -- スクリプト初期化 function InitialSetup( context) -- 最初のオペレーションレイヤーを作成する。 --== 移動 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "InitTestMain", "TestMain"); --== 攻撃 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "InitTestAttack", "TestAttack"); -- 常駐オペレーション設定 DefaultSetup( context, false); end -- 初期化する。 RegistInitializeFuncitonName( "InitialSetup"); --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --****************************************************************************** --[[ @brief 移動 ]] --****************************************************************************** function InitTestMain() debug_out("testメイン関数初期化"); end function TestMain( context) -- ターゲット補足関数 Targetting_CatchUpWithConeInSide( context, 1000, 360); -- 行動オペレーション Op_KeepDist( context, OperationIdentifier(1), 2, 4, 0.8, nil, 50, 30); Op_RoundRear( context, OperationIdentifier(2), 3, 6, 0.4, nil) end --****************************************************************************** --[[ @brief 攻撃 ]] --****************************************************************************** function InitTestAttack() -- end function TestAttack( context) --距離の変数宣言 local dist = GetToTargetDistance( context); -- 100m以上の場合発射 if ( dist > 100) then Op_Shoot( OperationIdentifier(1), 2, 4, 1, nil, 50, true, 1, 4); else Op_Shoot( OperationIdentifier(2), 2, 4, 1, nil, 0, true, 1, 4); end end