Пример #1
0
 private bool AddBots()
 {
     for (int i = 0; i < 10; i++)
     {
         var barbarianBehavior = MyDefinitionManager.Static.GetBotDefinition(new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.AI.Bot.MyObjectBuilder_HumanoidBot), "TestingBarbarian")) as MyAgentDefinition;
         MyAIComponent.Static.SpawnNewBot(barbarianBehavior);
     }
     MyPathfindingStopwatch.StartMeasuring();
     return(true);
 }
Пример #2
0
        private bool AddOneBarb()
        {
            //var barbarianBehavior = MyDefinitionManager.Static.GetBotDefinition(new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.AI.Bot.MyObjectBuilder_HumanoidBot), "TestingBarbarian")) as MyAgentDefinition;
            var barbarianBehavior = MyDefinitionManager.Static.GetBotDefinition(new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.AI.Bot.MyObjectBuilder_HumanoidBot), "SwordBarbarian")) as MyAgentDefinition;

            //var barbarianBehavior = MyDefinitionManager.Static.GetBotDefinition(new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.AI.Bot.MyObjectBuilder_HumanoidBot), "NormalWoodcutter")) as MyAgentDefinition;
            //var barbarianBehavior = MyDefinitionManager.Static.GetBotDefinition(new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.AI.Bot.MyObjectBuilder_HumanoidBot), "NormalPeasant")) as MyAgentDefinition;
            MyAIComponent.Static.SpawnNewBot(barbarianBehavior);
            MyPathfindingStopwatch.StartMeasuring();
            return(true);
        }