Пример #1
0
 public void OnMatchClick()
 {
     if (isMatching && mt_timer > 3)
     {
         DataSync.CancelMatch();
         EventHandler.GetEventHandler().AddOnceListener(ProtoName.CancelMatch, OnCancelMatchBack);
     }
     else if (!isMatching)
     {
         EventHandler.GetEventHandler().AddOnceListener(ProtoName.Match, OnMatchBack);
         DataSync.Match();
     }
 }
Пример #2
0
        public static void Login(ProtocolBase protocol)
        {
            int           start = 0;
            ProtocolBytes proto = (ProtocolBytes)protocol;

            proto.GetNameX(start, ref start);
            int ispass = proto.GetByte(start, ref start);

            if (ispass == 1)
            {
                Debug.Log("Login success");
                Client.Instance.pl_info.isLogin = true;
                //Login
                //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                DataSync.Match();
                //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            }
            else
            {
                Debug.Log("Login failed");
                //Login failed
            }
        }