コード例 #1
0
ファイル: ObjectiveService.cs プロジェクト: NicTda/MAGTask
        /// @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);
        }
コード例 #2
0
ファイル: LevelView.cs プロジェクト: NicTda/MAGTask
 /// @param objectiveText
 ///     The text to set
 ///
 public void ShowObjective(int index, ObjectiveModel model)
 {
     if (index < m_objectiveViews.Count)
     {
         m_objectiveViews[index].Initialise(model);
     }
 }
コード例 #3
0
        /// @param model
        ///     The model to initialise with
        ///
        public void Initialise(ObjectiveModel model)
        {
            m_objectiveModel = model;
            m_objectiveModel.OnProgressed += UpdateProgressDisplay;
            m_objectiveModel.OnCompleted  += OnCompleted;

            m_baseDisplay = GameTextIdentifiers.k_objectives[m_objectiveModel.m_data.m_type];
            UpdateProgressDisplay();
            m_animator.Play(k_animAppear);
        }