public void OnGUI()
        {
            if (m_mgrFSP != null)
            {
                GUILayout.Label("Client[" + m_playerId + "]: " + m_mgrFSP.GameState);
            }
            else
            {
                GUILayout.Label("Client[" + m_playerId + "]");
            }

            GUILayout.Label("最近一次VKey:" + m_lastVKey);

            if (FSPServer.Instance.IsRunning)
            {
                if (GUILayout.Button("Start"))
                {
                    Start(FSPServer.Instance.GetParam());
                }
            }

            if (GUILayout.Button("SendRoundBegin"))
            {
                m_mgrFSP.SendRoundBegin();
            }

            if (GUILayout.Button("SendControlStart"))
            {
                m_mgrFSP.SendControlStart();
            }

            if (GUILayout.Button("SendPing"))
            {
                m_mgrFSP.SendFSP(FSPVKeyBase.PING, SGFRandom.Default.Range(1, 1000));
            }

            if (GUILayout.Button("SendRoundEnd"))
            {
                m_mgrFSP.SendRoundEnd();
            }

            if (GUILayout.Button("SendGameEnd"))
            {
                m_mgrFSP.SendGameEnd();
            }

            if (GUILayout.Button("SendGameExit"))
            {
                m_mgrFSP.SendGameExit();
            }
        }
Example #2
0
 /// <summary>
 /// 回合结束
 /// </summary>
 public void RoundEnd()
 {
     Debuger.Log(LOG_TAG, "RoundEnd()");
     m_mgrFSP.SendRoundEnd();
 }
Example #3
0
        public void OnGUI()
        {
            if (m_mgrFSP != null)
            {
                GUILayout.Label("Client[" + m_playerId + "]: " + m_mgrFSP.GameState);
                GUILayout.Label("Port: " + m_mgrFSP.Port);
            }
            else
            {
                GUILayout.Label("Client[" + m_playerId + "]");
            }
            GUILayout.Label("VKey:" + m_lastVKey);

            // 没开的话只能先开
            if (m_mgrFSP == null)
            {
                if (GUILayout.Button("Start"))
                {
                    // 这些变量不能共用
                    FSPParam param = FSPServer.Instance.GetParam();
                    param.sid    = sid;
                    param.authId = (int)playerId;

                    Start(param);
                }
                return;
            }

            if (GUILayout.Button("SendGameBegin"))
            {
                m_mgrFSP.SendGameBegin();
            }

            if (GUILayout.Button("SendRoundBegin"))
            {
                m_mgrFSP.SendRoundBegin();
            }

            if (GUILayout.Button("SendControlStart"))
            {
                m_mgrFSP.SendControlStart();
            }

            if (GUILayout.Button("SendPing"))
            {
                m_mgrFSP.SendFSP(FSPVKeyBase.PING, UnityEngine.Random.Range(1, 1000));
            }

            if (GUILayout.Button("SendRoundEnd"))
            {
                m_mgrFSP.SendRoundEnd();
            }

            if (GUILayout.Button("SendGameEnd"))
            {
                m_mgrFSP.SendGameEnd();
            }

            if (GUILayout.Button("SendPlayerExit"))
            {
                m_mgrFSP.SendPlayerExit();
            }
        }
 public void RoundEnd()
 {
     m_fsp.SendRoundEnd();
 }
Example #5
0
 /// <summary>
 /// round over
 /// </summary>
 public void RoundEnd()
 {
     MyLogger.Log(LOG_TAG, "RoundEnd()");
     mgrFSP.SendRoundEnd();
 }