Esempio n. 1
0
        void OnUpdateGameOver(int current_time_int)
        {
            m_sync_client.Stop();
            List <Command> commands = m_sync_client.GetOutputCommands();

            if (commands.Count > 0)
            {
                NetworkMessages_SyncCommands msg = new NetworkMessages_SyncCommands();
                msg.PlayerPstid = m_local_player_pstid;
                for (int i = 0; i < commands.Count; ++i)
                {
                    msg.AddCommand(commands[i]);
                }
                m_network.SendToServer(msg);
                m_sync_client.ClearOutputCommand();
            }
            m_state = TestCombatClientState.Ending;
            NetworkMessages_GameOver msg2 = new NetworkMessages_GameOver();

            msg2.PlayerPstid = m_local_player_pstid;
            msg2.m_crc       = m_logic_world.GetCRC();
            m_network.SendToServer(msg2);
        }
Esempio n. 2
0
 public void OnNetworkMessage_GameOver(NetworkMessages_GameOver msg)
 {
     UnityEngine.Debug.LogError("测试同步模型:Client " + msg.PlayerPstid + " GameOver, CRC = " + msg.m_crc);
 }