Пример #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);
        }
Пример #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();
                }
            }
        }
Пример #3
0
 public ObjectiveAssignmentItem(AssignmentDriver asnDriver, AssignmentObjective objective, int idx = 0)
     : base(asnDriver, idx)
 {
     AssignmentObjective = objective;
 }
Пример #4
0
 public bool IsObjectiveActive(AssignmentObjective objective)
 {
     return(!objective.IsHidden ||
            (objective.Objective != null && m_activatedObjectives.Contains(objective.Objective.Id)));
 }