示例#1
0
        public static void SignUpReceived(int _fromClient, Packet _packet)
        {
            ClientData.Account _account   = _packet.ReadObject <ClientData.Account>();
            string             validation = AccountHandler.SignUp(_account.username, _account.password);

            ServerSend.SignUpValidation(_fromClient, validation);
        }
示例#2
0
        private void Disconnect()
        {
            AccountHandler.SignOut(id);

            player = null;
            tcp.Disconnect();
            udp.Disconnect();
        }
示例#3
0
        public static void ScorePlayReceived(int _fromClient, Packet _packet)
        {
            string uname = _packet.ReadString();
            int    score = _packet.ReadInt();
            int    play  = _packet.ReadInt();

            AccountHandler.AddScorePlay(uname, score, play);
        }
示例#4
0
        public static void SignInReceived(int _fromClient, Packet _packet)
        {
            ClientData.Account _account = _packet.ReadObject <ClientData.Account>();

            string validation = AccountHandler.SignIn(_account.username, _account.password);

            if (validation == "login was successful")
            {
                Server.readyDatabase.Add(new ReadyDatabase(_fromClient, false));
            }

            ServerSend.SignInValidation(_fromClient, validation);
        }
示例#5
0
        public static void ScorePlayerSent(int _fromClient, Packet _packet)
        {
            string uname = _packet.ReadString();

            AccountHandler.ShowScorePlay(_fromClient, uname);
        }