private void OnDeckSelected(int deckId) { GotoSubState(SubState.GameSelection, SlidingSide.Right); PlayerData instance = PlayerData.instance; SquadDefinition squadDefinition = RuntimeData.squadDefinitions[deckId]; WeaponDefinition weaponDefinition = RuntimeData.weaponDefinitions[squadDefinition.weapon.value]; m_ui.playerAvatar.nickname = instance.nickName; m_ui.playerAvatar.weaponDefinition = weaponDefinition; m_ui.ShowPlayerAvatarAnim(value: true); }
protected Tuple <SquadDefinition, SquadFakeData> GetSquadDataByWeaponId(int weaponId) { for (int i = 0; i < m_fakeData.squads.Length; i++) { SquadFakeData squadFakeData = m_fakeData.squads[i]; SquadDefinition squadDefinition = RuntimeData.squadDefinitions[squadFakeData.id]; if (squadDefinition.weapon.value == weaponId) { return(new Tuple <SquadDefinition, SquadFakeData>(squadDefinition, squadFakeData)); } } SquadFakeData squadFakeData2 = m_fakeData.squads[0]; return(new Tuple <SquadDefinition, SquadFakeData>(RuntimeData.squadDefinitions[squadFakeData2.id], squadFakeData2)); }
public void Set(SquadDefinition definition, SquadFakeData fakeData) { if (definition == null || fakeData == null) { m_name.get_gameObject().SetActive(false); m_ambience.get_gameObject().SetActive(false); m_difficulty.get_gameObject().SetActive(false); return; } string title = fakeData.title; string description = fakeData.description; string difficulty = fakeData.difficulty; m_illu.set_sprite(fakeData.illu); m_name.SetText(title); m_name.get_gameObject().SetActive(!string.IsNullOrEmpty(title)); m_ambience.SetText(description); m_ambience.get_gameObject().SetActive(!string.IsNullOrEmpty(description)); m_difficulty.richText = true; m_difficulty.SetText(difficulty); m_difficulty.get_gameObject().SetActive(!string.IsNullOrEmpty(difficulty)); }