Esempio n. 1
0
        private void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
        {
            Text text;
            if (!this.objectiveTexts.TryGetValue(args.Objective, out text))
            {
                return;
            }

            switch (args.State)
            {
                case ObjectiveState.Inactive:
                    text.color = Color.white;
                    break;

                case ObjectiveState.Active:
                    text.color = Color.yellow;
                    break;

                case ObjectiveState.Complete:
                    text.color = Color.green;
                    break;
            }
        }
Esempio n. 2
0
        private void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
        {
            this.mayLeave = args.CompletedObjectives == args.TotalObjectives;

            if (this.mayLeave)
            {
                // Victory!
                this.EventManager.OnVictory(this, EventArgs.Empty);
            }
        }
Esempio n. 3
0
 public void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
 {
     var handler = this.ObjectiveStateChanged;
     if (handler != null)
     {
         handler(sender, args);
     }
 }
Esempio n. 4
0
 private void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
 {
     this.completedObjectives = args.CompletedObjectives;
     this.totalObjectives = args.TotalObjectives;
 }