public void Stop() { mLogicCore.OnStop(); mLogicCore = null; if (mWorkingThread != null) { mWorkingThread.Join(); mWorkingThread = null; } isRunning = false; }
public void Start(IThreadedLogicCore inLogicCore) { if (inLogicCore == null) { return; } mLogicCore = inLogicCore; mWorkingThread = new Thread(new ThreadStart(mLogicCore.MainLoop)); mLogicCore.OnStart(); mWorkingThread.Name = inLogicCore.ThreadName; mWorkingThread.Start(); isRunning = true; }