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); } }
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(); } }