2 using System.Collections.Generic;
7 namespace droid.Runtime.Prototyping.Evaluation.Tasks {
14 [SerializeField] Stack<GoalCellSensor> _goal_stack;
19 get {
return this._current_goal_cell; }
20 private set { this._current_goal_cell = value; }
24 if (this._sequence == null || this._sequence.Length == 0) {
25 this._sequence = FindObjectsOfType<GoalCellSensor>();
26 Array.Sort(this._sequence, (g1, g2) => g1.
OrderIndex.CompareTo(g2.OrderIndex));
29 Array.Reverse(this._sequence);
30 this._goal_stack =
new Stack<GoalCellSensor>(this._sequence);
31 this.CurrentGoalCell = this.PopGoal();
37 this.CurrentGoalCell = this._goal_stack.Pop();
38 return this.CurrentGoalCell;
GoalCellSensor [] GetSequence()