protected override void UnloadData() { base.UnloadData(); m_thread.StopAndJoin(); m_thread = null; m_botCollection = null; }
public override void LoadData() { base.LoadData(); Sync.Players.NewPlayerRequestSucceeded += PlayerCreated; Sync.Players.LocalPlayerRemoved += PlayerRemoved; m_botCollection = new MyBotCollection(); m_thread = new MyAIThread(m_botCollection); m_thread.Start(); }
internal MyAIThread(MyBotCollection bots) { m_bots = bots; m_thread = new Thread(ThreadStart); m_shouldRun = true; }