|
@@ -276,34 +276,34 @@ public class CreateSeaSJEventHandler : AEvent<CreateSeaSJTask>
|
|
|
}
|
|
|
|
|
|
[Event]
|
|
|
-public class CreateLandSJEventHandler : AEvent<CreateLandSJTask>
|
|
|
+public class CreateLandSJEventHandler : AEvent<CreateLandSXTask>
|
|
|
{
|
|
|
- protected override UniTask Run(CreateLandSJTask config)
|
|
|
+ protected override UniTask Run(CreateLandSXTask config)
|
|
|
{
|
|
|
var taskSys = Game.Scene.GetComponent<TaskComponent>();
|
|
|
LandSJRescueMission mission = ComponentFactory.Create<LandSJRescueMission>();
|
|
|
taskSys.LandSJRescueMissions.Add(mission);
|
|
|
- mission.MissionId = $"陆上搜索救援任务 {config.LandSJTask.missionInformation.MissionName}";
|
|
|
+ mission.MissionId = $"陆上搜索救援任务 {config.LandSXTask.missionInformation.MissionName}";
|
|
|
mission.ExecutionContext = config.EditorConfig.runCounts;
|
|
|
//mission.AddComponent<SJTotalTaskPerformanceComponent>();
|
|
|
- for (int i = 0; i < config.LandSJTask.missionInformation.aircraftInfos.Length; i++)
|
|
|
+ for (int i = 0; i < config.LandSXTask.missionInformation.aircraftInfos.Length; i++)
|
|
|
{
|
|
|
//飞机参数
|
|
|
var aircraftParameter = config.EditorConfig.aircraftParameters.Find(
|
|
|
- a => a.AircraftID == config.LandSJTask.missionInformation.aircraftInfos[i].AircraftType);
|
|
|
+ a => a.AircraftID == config.LandSXTask.missionInformation.aircraftInfos[i].AircraftType);
|
|
|
//基地
|
|
|
var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
|
|
|
|
|
|
- TargetPoint targetPoint = config.EditorConfig.targetPoints.Find(t => t.TargetPointId == config.LandSJTask.TargetPointId);
|
|
|
+ TargetPoint targetPoint = config.EditorConfig.targetPoints.Find(t => t.TargetPointId == config.LandSXTask.TargetPointId);
|
|
|
//创建飞行计划编辑器
|
|
|
var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, new TargetPoint[] { targetPoint });
|
|
|
|
|
|
AircraftLandSJ aircraft = ComponentFactory.Create<AircraftLandSJ, FlightPlanEditor>(flightPlanEditor);
|
|
|
- aircraft.Name = config.LandSJTask.missionInformation.aircraftInfos[i].AircraftType;
|
|
|
- aircraft.TaskReadyTime = config.LandSJTask.missionInformation.TakeoffPreparationTime;
|
|
|
+ aircraft.Name = config.LandSXTask.missionInformation.aircraftInfos[i].AircraftType;
|
|
|
+ aircraft.TaskReadyTime = config.LandSXTask.missionInformation.TakeoffPreparationTime;
|
|
|
mission.aircrafts.Add(aircraft);
|
|
|
- aircraft.taskContent = config.LandSJTask;
|
|
|
- aircraft.AircraftId = config.LandSJTask.missionInformation.aircraftInfos[i].AircraftId;
|
|
|
+ aircraft.taskContent = config.LandSXTask;
|
|
|
+ aircraft.AircraftId = config.LandSXTask.missionInformation.aircraftInfos[i].AircraftId;
|
|
|
aircraft.MissionEndPoint = new MissionEndPoint
|
|
|
{
|
|
|
MissionEndPointLongitude = targetPoint.TargetPointLongitude,
|