Exemplo n.º 1
0
        public void Stop()
        {
            m_GameState = FSPGameState.None;

            if (m_Controller != null)
            {
                m_Controller.Stop();
                m_Controller = null;
            }

            if (m_Client != null)
            {
                m_Client.Stop();
                m_Client = null;
            }

            m_FrameBuffer.Clear();
            m_CurrentFrameIndex = 0;
            m_FrameListener     = null;

            m_NextLocalFrame = null;

            _mainPlayerId       = 0;
            m_Param             = null;
            m_GameStateListener = null;

            m_IsRunning = false;
        }
Exemplo n.º 2
0
        // 游戏正式开始
        public void Start(FSPParam param, uint playerId)
        {
            m_Param       = param;
            _mainPlayerId = playerId;
            LOG_TAG       = "FSPManager[" + playerId + "]";

            // 开房间形式
            if (!param.useLocal)
            {
                m_Client = new FSPClient(OnFSPListener);
                m_Client.Start(param);
            }

            m_Controller = new FSPController();
            m_Controller.Start(param);

            m_GameState = FSPGameState.Create;
            ResetRound();

            m_IsRunning = true;
        }