예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
 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;
             }
         }
     }
 }