private unsafe void InitGodsChoice() { m_playableGods.Clear(); List <string> list = new List <string>(); God god = PlayerData.instance.god; int num = -1; int num2 = 0; foreach (GodDefinition value in RuntimeData.godDefinitions.Values) { if (value.playable) { m_playableGods.Add(value.god); list.Add(RuntimeData.FormattedText(value.i18nNameId)); if (value.god == god) { num = num2; } num2++; } } m_godChoiceDropdown.ClearOptions(); m_godChoiceDropdown.AddOptions(list); m_godChoiceDropdown.value = ((num >= 0) ? num : 0); m_godChoiceDropdown.onValueChanged.AddListener(new UnityAction <int>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); }
private void InitDecks() { m_deckList = new List <DeckInfo>(); m_decksDropDown.ClearOptions(); God god = PlayerData.instance.god; int currentWeapon = PlayerData.instance.GetCurrentWeapon(); if (RuntimeData.weaponDefinitions.TryGetValue(currentWeapon, out WeaponDefinition value)) { if (RuntimeData.squadDefinitions.TryGetValue(value.defaultDeck.value, out SquadDefinition value2)) { DeckInfo deckInfo = value2.ToDeckInfo(); deckInfo.Id = -value2.get_id(); m_deckList.Add(deckInfo); } foreach (DeckInfo deck in PlayerData.instance.GetDecks()) { if (deck.Weapon == currentWeapon) { m_deckList.Add(deck); } } int selectedDeckId = PlayerData.instance.GetSelectedDeckByWeapon(value.get_id()); int num = -1; num = m_deckList.FindIndex((DeckInfo deck) => deck.Id == selectedDeckId); if (m_decksDropDown != null) { m_decksDropDown.AddOptions((from sd in m_deckList select sd.Name).ToList()); m_decksDropDown.value = num; } } }
private void InitGodsChoice() { m_playableGods.Clear(); List <string> list = new List <string>(); God god = PlayerData.instance.god; int num = -1; int num2 = 0; foreach (GodDefinition value in RuntimeData.godDefinitions.Values) { if (value.playable) { m_playableGods.Add(value.god); list.Add(RuntimeData.FormattedText(value.i18nNameId)); if (value.god == god) { num = num2; } num2++; } } m_godChoiceDropdown.ClearOptions(); m_godChoiceDropdown.AddOptions(list); m_godChoiceDropdown.value = ((num >= 0) ? num : 0); int currentWeapon = PlayerData.instance.GetCurrentWeapon(); InitWeapons(currentWeapon); }
private void InitializeServerList(string defaultServer) { List <string> list = (from s in m_serverList.GetAllServers() select s.displayName).ToList(); m_serversDropdown.AddOptions(list); int value = Math.Max(0, list.FindIndex((string s) => s == defaultServer)); m_serversDropdown.value = value; }
protected unsafe override void Awake() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown m_backToGuestButton.get_gameObject().SetActive(CredentialProvider.HasGuestMode()); m_loginButton.get_onClick().AddListener(new UnityAction((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); m_backToGuestButton.get_onClick().AddListener(new UnityAction((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); m_startStateDropDown.AddOptions((from s in EnumUtility.GetValues <StartState>() select s.ToString()).ToList()); m_startStateDropDown.value = PlayerPreferences.startState; m_startStateDropDown.onValueChanged.AddListener(new UnityAction <int>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); PlayerPreferences.useGuest = false; }
private unsafe void InitializeServerList() { List <string> list = (from s in m_serverList.GetAllServers() select s.displayName).ToList(); m_serversDropdown.AddOptions(list); string defaultServer = PlayerPreferences.lastServer; int num = list.FindIndex((string s) => s == defaultServer); if (num < 0) { num = 0; } m_serversDropdown.value = num; OnSelectServer(num); m_serversDropdown.onValueChanged.AddListener(new UnityAction <int>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); }
private void InitWeapons(int selectedWeaponId) { m_weaponList = new List <WeaponDefinition>(); m_weaponsDropdown.ClearOptions(); God god = PlayerData.instance.god; foreach (int item in PlayerData.instance.weaponInventory) { if (RuntimeData.weaponDefinitions.TryGetValue(item, out WeaponDefinition value) && value.god == god) { m_weaponList.Add(value); } } int value2 = m_weaponList.FindIndex((WeaponDefinition definition) => definition.get_id() == selectedWeaponId); if (m_weaponsDropdown != null) { m_weaponsDropdown.AddOptions((from sd in m_weaponList select sd.get_displayName()).ToList()); m_weaponsDropdown.value = value2; } InitDecks(); }