Пример #1
0
 private void BasicUserAccountStatePanel_FormClosing(
     object sender, FormClosingEventArgs e)
 {
     // Safe close
     basicUserPanel.Dispose();
     loginPanel.Close();
 }
Пример #2
0
    static void OnLoginRes(object data)
    {
        CSLoginRes rsp = NetworkManager.Deserialize <CSLoginRes>(data);

        Debug.Log("OnLoginRes,retcode=" + rsp.RetCode);
        if (rsp.RetCode == 0)
        {
            DataCenter.playerID      = rsp.PlayerData.PlayerID;
            DataCenter.name          = rsp.PlayerData.Name;
            DataCenter.spawnPosition = rsp.PlayerData.Position.ToVector3();
            DataCenter.spawnRotation = rsp.PlayerData.Rotation.ToVector3();
            ItemSelectPanel.Init(rsp.PlayerData.SelectIndex, rsp.PlayerData.SelectItems);
            DataCenter.state        = ClientState.InRoom;
            ChunkManager.blockAttrs = rsp.BlockAttrs;
            LoginPanel.Close();
            MainMenu.Close();
            LoadingUI.Show();
            SceneManager.LoadScene("GameScene");
            ChatPanel.AddLine(DataCenter.name + ", welcome!");
        }
        else
        {
            FastTips.Show(rsp.RetCode);
        }
    }
Пример #3
0
 private void AdministratorPanel_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Safe close program
     this.Dispose();
     loginPanel.Close();
 }
Пример #4
0
 private void BasicUserPanel_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Safe close program
     this.Dispose();
     loginPanel.Close();
 }