/// @param objectiveData /// The data of the objective to add /// /// @return The model fo the objective /// public ObjectiveModel AddObjective(ObjectiveData objectiveData) { var objectiveModel = new ObjectiveModel(objectiveData); m_objectives.Add(objectiveModel); return(objectiveModel); }
/// @param objectiveData /// The data of the objective /// @param index /// The index of the objective /// private void RegisterObjective(ObjectiveData objectiveData, int index) { if (objectiveData.m_type != ObjectiveType.None) { var model = m_objectiveService.AddObjective(objectiveData); model.OnCompleted += OnObjectiveCompleted; m_view.ShowObjective(index, model); } }
/// @param index /// The index of the objective /// @param data /// The data of the objective /// private void OnObjectiveRequested(int index, ObjectiveData data) { // Update the objective s_unsavedChanged = true; if (s_levelData.m_objectives.Count <= index) { s_levelData.m_objectives.Add(new ObjectiveData()); } s_levelData.m_objectives[index] = data; }
/// @param data /// The objective data /// public ObjectiveModel(ObjectiveData data) { m_data = data; }
/// @param objectiveData /// The data to initialise with /// public void Initialise(ObjectiveData objectiveData) { m_objectiveData = objectiveData; RefreshUI(); }
/// @param index /// The index of the objective /// @param objective /// The objective to set /// public void SetObjective(int index, ObjectiveData objective) { m_objectives[index].Initialise(objective); }