Exemple #1
0
    void HandleIngame(int packetNum, byte[] data)
    {
        KaymakGames.KaymakGames buffer = new KaymakGames.KaymakGames();
        buffer.WriteBytes(data);

        int packetnum = buffer.ReadInteger();

        Player.instance.Username  = buffer.ReadString();
        Player.instance.Password  = buffer.ReadString();
        Player.instance.Level     = buffer.ReadInteger();
        Player.instance.Access    = buffer.ReadByte();
        Player.instance.FirstTime = buffer.ReadByte();
        buffer = null;

        _playerWelcome.text        = "Welcome back, " + Player.instance.Username;
        MenuManager.instance._menu = MenuManager.Menu.Ingame;
    }