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); }
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); }