コード例 #1
0
        public void SetOrder(Order order, string option)
        {
            CurrentOrderOption = option;
            CurrentOrder       = order;
            objectiveManager.SetOrder(order, option);

            SetOrderProjSpecific(order);
        }
コード例 #2
0
        public void SetOrder(Order order, string option)
        {
            CurrentOrderOption = option;
            CurrentOrder       = order;
            objectiveManager.SetOrder(order, option);

            GameMain.GameSession.CrewManager.SetCharacterOrder(Character, order);
        }
コード例 #3
0
        public void SetOrder(Order order, string option, Character orderGiver, bool speak = true)
        {
            CurrentOrderOption = option;
            CurrentOrder       = order;
            objectiveManager.SetOrder(order, option, orderGiver);
            if (speak && Character.SpeechImpediment < 100.0f)
            {
                Character.Speak(TextManager.Get("DialogAffirmative"), null, 1.0f);
            }

            SetOrderProjSpecific(order);
        }
コード例 #4
0
 public void SetOrder(Order order, string option, Character orderGiver, bool speak = true)
 {
     CurrentOrderOption = option;
     CurrentOrder       = order;
     objectiveManager.SetOrder(order, option, orderGiver);
     if (ObjectiveManager.CurrentOrder != null && speak && Character.SpeechImpediment < 100.0f)
     {
         if (ObjectiveManager.CurrentOrder is AIObjectiveRepairItems repairItems && repairItems.Targets.None())
         {
             Character.Speak(TextManager.Get("DialogNoRepairTargets"), null, 3.0f, "norepairtargets");
         }
         else if (ObjectiveManager.CurrentOrder is AIObjectiveChargeBatteries chargeBatteries && chargeBatteries.Targets.None())
         {
             Character.Speak(TextManager.Get("DialogNoBatteries"), null, 3.0f, "nobatteries");
         }
コード例 #5
0
        public HumanAIController(Character c) : base(c)
        {
            steeringManager = new IndoorsSteeringManager(this, true);

            objectiveManager = new AIObjectiveManager(c);
            objectiveManager.AddObjective(new AIObjectiveFindSafety(c));
            objectiveManager.AddObjective(new AIObjectiveIdle(c));

            updateObjectiveTimer = Rand.Range(0.0f, UpdateObjectiveInterval);

            if (GameMain.GameSession != null && GameMain.GameSession.CrewManager != null)
            {
                CurrentOrder = Order.PrefabList.Find(o => o.Name.ToLowerInvariant() == "dismissed");
                objectiveManager.SetOrder(CurrentOrder, "");
                GameMain.GameSession.CrewManager.SetCharacterOrder(Character, CurrentOrder);
            }
        }