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); }
private void Disconnect() { AccountHandler.SignOut(id); player = null; tcp.Disconnect(); udp.Disconnect(); }
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); }
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); }
public static void ScorePlayerSent(int _fromClient, Packet _packet) { string uname = _packet.ReadString(); AccountHandler.ShowScorePlay(_fromClient, uname); }