예제 #1
0
        void OnReadyProc(byte[] data)
        {
            ADebug.Log("OnReadyProc");

            if (data != null)
            {
                LockStepResult result = new LockStepResult();
                if (result.Decode(data))
                {
                    if (readyEventHandler != null)
                    {
                        readyEventHandler(result);
                    }

                    if (result.IsSuccess())
                    {
                        hasReady = true;
                    }
                }
                else
                {
                    ADebug.LogError("OnReadyProc Decoce Error");
                }
            }
            else
            {
                ADebug.LogError("OnReadyProc data is null");
            }
        }
예제 #2
0
 void OnStateChangedProc(int state, byte[] data)
 {
     ADebug.Log("OnStateChangedProc:" + state);
     if (data != null)
     {
         LockStepResult result = new LockStepResult();
         if (result.Decode(data))
         {
             if (StateChangedEvent != null)
             {
                 StateChangedEvent((LockStepState)state, result);
             }
         }
         else
         {
             ADebug.LogError("OnStateChangedProc Decoce Error");
         }
     }
     else
     {
         ADebug.LogError("OnStateChangedProc data is null");
     }
 }
예제 #3
0
        void OnLogoutProc(byte[] data)
        {
            ADebug.Log("OnLogoutProc");

            if (data != null)
            {
                LockStepResult result = new LockStepResult();
                if (result.Decode(data))
                {
                    if (logoutEventHandler != null)
                    {
                        logoutEventHandler(result);
                    }
                }
                else
                {
                    ADebug.LogError("OnLogoutProc Decoce Error");
                }
            }
            else
            {
                ADebug.LogError("OnLogoutProc data is null");
            }
        }