private void CB_FadeToParty() { OverworldGUI.ProcessDayTint(false); if (_fadeTransition.IsDone) { _fadeTransition = null; BattleGUI.Instance.SetMessageWindowVisibility(true); _ = new PartyGUI(_party, PartyGUI.Mode.BattleSwitchIn, OnPartyClosed); } }
private void CB_FadeToPartyForReplacement() { OverworldGUI.ProcessDayTint(false); if (_fadeTransition.IsDone) { _fadeTransition = null; SetMessageWindowVisibility(true); _ = new PartyGUI(SpritedParties[Trainer.Id], PartyGUI.Mode.BattleReplace, OnPartyReplacementClosed); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } }
private void SendAuth() { if (m_client != null && m_client.ConnectionStatus == NetConnectionStatus.Connected && m_serverCon != null) { m_chat = (ComChatGUI)Object.FindObjectOfType(typeof(ComChatGUI)); m_inventory = (InventoryGUI)Object.FindObjectOfType(typeof(InventoryGUI)); m_hud = (Hud)Object.FindObjectOfType(typeof(Hud)); m_map = (MapGUI)Object.FindObjectOfType(typeof(MapGUI)); m_partyGui = (PartyGUI)Object.FindObjectOfType(typeof(PartyGUI)); m_popupGui = (PopupGUI)Object.FindObjectOfType(typeof(PopupGUI)); m_clientInput = (ClientInput)Object.FindObjectOfType(typeof(ClientInput)); m_missionObjs = (MissionObjective[])Object.FindObjectsOfType(typeof(MissionObjective)); m_specialAreas = (SpecialArea[])Object.FindObjectsOfType(typeof(SpecialArea)); Debug.Log("Connected to server ... loading level complete ... send AUTH at " + Time.time); NetOutgoingMessage netOutgoingMessage = m_serverCon.Peer.CreateMessage(); netOutgoingMessage.Write(MessageIds.Auth); netOutgoingMessage.Write(m_name); netOutgoingMessage.Write(m_pwhash); netOutgoingMessage.Write(m_id); netOutgoingMessage.Write("1.0.1"); netOutgoingMessage.Write((byte)PlayerPrefs.GetInt("prefAppearance", 0)); m_serverCon.SendMessage(netOutgoingMessage, NetDeliveryMethod.ReliableOrdered, 1); } }