Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;
 }
Beispiel #4
0
 public bool IsObjectiveActive(AssignmentObjective objective)
 {
     return(!objective.IsHidden ||
            (objective.Objective != null && m_activatedObjectives.Contains(objective.Objective.Id)));
 }