private void BasicUserAccountStatePanel_FormClosing( object sender, FormClosingEventArgs e) { // Safe close basicUserPanel.Dispose(); loginPanel.Close(); }
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); } }
private void AdministratorPanel_FormClosing(object sender, FormClosingEventArgs e) { // Safe close program this.Dispose(); loginPanel.Close(); }
private void BasicUserPanel_FormClosing(object sender, FormClosingEventArgs e) { // Safe close program this.Dispose(); loginPanel.Close(); }