Ejemplo 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;
            }
        }
Ejemplo 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);
            }
        }
Ejemplo n.º 3
0
 public void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
 {
     var handler = this.ObjectiveStateChanged;
     if (handler != null)
     {
         handler(sender, args);
     }
 }
Ejemplo n.º 4
0
 private void OnObjectiveStateChanged(object sender, ObjectiveStateChangedEventArgs args)
 {
     this.completedObjectives = args.CompletedObjectives;
     this.totalObjectives = args.TotalObjectives;
 }