示例#1
0
        public void Stop()
        {
            mLogicCore.OnStop();
            mLogicCore = null;

            if (mWorkingThread != null)
            {
                mWorkingThread.Join();
                mWorkingThread = null;
            }
            isRunning = false;
        }
示例#2
0
        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;
        }