public void GetBotsData(List <MyObjectBuilder_AIComponent.BotData> botDataList) { foreach (KeyValuePair <int, IMyBot> pair in this.m_allBots) { MyObjectBuilder_AIComponent.BotData item = new MyObjectBuilder_AIComponent.BotData { BotBrain = pair.Value.GetObjectBuilder(), PlayerHandle = pair.Key }; botDataList.Add(item); } }
public void GetBotsData(List <MyObjectBuilder_AIComponent.BotData> botDataList) { foreach (var keyValPair in m_allBots) { var newData = new MyObjectBuilder_AIComponent.BotData() { BotBrain = keyValPair.Value.GetObjectBuilder(), PlayerHandle = keyValPair.Key }; botDataList.Add(newData); } }