private void AddObjective(AssignmentObjective obj, int idx) { var asnItem = new ObjectiveAssignmentItem(m_currentDriver, obj, idx); var item = AddSelectableItem(ItemPrefab, (_item) => { PopulateComponents(asnItem); }); item.Populate(asnItem); }
public virtual void Populate(AssignmentObjective objective) { SetText(objective.Objective.Title); SetImage(objective.Objective.ImageUrl); if (TaskManager.Instance.IsObjectiveComplete(objective.Objective.Id)) { if (OnObjectiveComplete != null) { OnObjectiveComplete.Invoke(); } } else { if (OnObjectiveNotComplete != null) { OnObjectiveNotComplete.Invoke(); } } }
public ObjectiveAssignmentItem(AssignmentDriver asnDriver, AssignmentObjective objective, int idx = 0) : base(asnDriver, idx) { AssignmentObjective = objective; }
public bool IsObjectiveActive(AssignmentObjective objective) { return(!objective.IsHidden || (objective.Objective != null && m_activatedObjectives.Contains(objective.Objective.Id))); }