예제 #1
0
 public void SetGoal(UnitGoal goal)
 {
     if (behaviourGenerators.TryGetValue(goal.GetType(), out var generator))
     {
         currentBehaviour = generator.Invoke(goal, this);
     }
     else
     {
         currentBehaviour = null;
     }
     rethinkTimer.Reset();
 }
예제 #2
0
        // Methods.

        public string ComposeDescription(UnitGoal goal) => descriptionExtractor.Invoke(goal);