コード例 #1
0
 void UpdateAssignment()
 {
     if (missionAssignment != null && missionAssignment.assignedAgent != null)
     {
         missionAssignment.assignedAgent.UnregisterAction(UpdateSlot);
     }
     missionAssignment = selectedMission.Value.assignments[slotNumber];
     if (missionAssignment != null && missionAssignment.assignedAgent != null)
     {
         missionAssignment.assignedAgent.RegisterAction(UpdateSlot);
     }
 }
コード例 #2
0
ファイル: Mission.cs プロジェクト: dsim7/factions
 public void Reset()
 {
     isSuccess    = false;
     status.Value = MissionStatusEnum.Pending;
     startTime    = 0;
     completeTime = 0;
     assignments  = new MissionAssignment[MAX_AGENTS];
     for (int i = 0; i < assignments.Length; i++)
     {
         assignments[i] = new MissionAssignment();
     }
 }