public override MyObjectBuilder_SessionComponent GetObjectBuilder() { if (!MyPerGameSettings.EnableAi) return null; MyObjectBuilder_AIComponent ob = (MyObjectBuilder_AIComponent)base.GetObjectBuilder(); ob.BotBrains = new List<MyObjectBuilder_AIComponent.BotData>(); m_botCollection.GetBotsData(ob.BotBrains); return ob; }
public override MyObjectBuilder_SessionComponent GetObjectBuilder() { if (!MyPerGameSettings.EnableAi) { return(null); } MyObjectBuilder_AIComponent objectBuilder = (MyObjectBuilder_AIComponent)base.GetObjectBuilder(); objectBuilder.BotBrains = new List <MyObjectBuilder_AIComponent.BotData>(); this.m_botCollection.GetBotsData(objectBuilder.BotBrains); return(objectBuilder); }
public override void Init(MyObjectBuilder_SessionComponent sessionComponentBuilder) { if (MyPerGameSettings.EnableAi) { base.Init(sessionComponentBuilder); MyObjectBuilder_AIComponent component = (MyObjectBuilder_AIComponent)sessionComponentBuilder; if (component.BotBrains != null) { foreach (MyObjectBuilder_AIComponent.BotData data in component.BotBrains) { this.m_loadedBotObjectBuildersByHandle[data.PlayerHandle] = data.BotBrain; } } } }