Ejemplo n.º 1
0
        /*public static void PlayerMovement(int _fromClient, Packet _packet)
         * {
         *  bool[] _inputs = new bool[_packet.ReadInt()];
         *  for (int i = 0; i < _inputs.Length; i++)
         *  {
         *      _inputs[i] = _packet.ReadBool();
         *  }
         *  Quaternion _rotation = _packet.ReadQuaternion();
         *
         *  Server.clients[_fromClient].player.SetInput(_inputs, _rotation);
         * }*/

        public static void Login(int fromClient, Packet packet)
        {
            string username = packet.ReadString();
            string password = packet.ReadString();

            AccountsManager.CheckCorrectLogin(username, password, fromClient);
        }
Ejemplo n.º 2
0
        public static void Register(int fromClient, Packet packet)
        {
            string username = packet.ReadString();
            string password = packet.ReadString();

            Console.WriteLine(username + " " + password);
            AccountsManager.Register(username, password, fromClient);
        }