// Token: 0x060020F2 RID: 8434 RVA: 0x0009ADC9 File Offset: 0x00098FC9 private void ClearPadDisplay(CharacterSelectController.CharacterPad characterPad) { if (characterPad.displayInstance) { UnityEngine.Object.Destroy(characterPad.displayInstance); } }
// Token: 0x060020F1 RID: 8433 RVA: 0x0009ABA4 File Offset: 0x00098DA4 private void Update() { this.SetEventSystem(this.eventSystemLocator.eventSystem); if (this.previousSurvivorIndex != this.selectedSurvivorIndex) { this.RebuildLocal(); this.previousSurvivorIndex = this.selectedSurvivorIndex; } if (this.characterDisplayPads.Length != 0) { for (int i = 0; i < this.characterDisplayPads.Length; i++) { CharacterSelectController.CharacterPad characterPad = this.characterDisplayPads[i]; NetworkUser networkUser = null; List <NetworkUser> list = new List <NetworkUser>(NetworkUser.readOnlyInstancesList.Count); list.AddRange(NetworkUser.readOnlyLocalPlayersList); for (int j = 0; j < NetworkUser.readOnlyInstancesList.Count; j++) { NetworkUser item = NetworkUser.readOnlyInstancesList[j]; if (!list.Contains(item)) { list.Add(item); } } if (i < list.Count) { networkUser = list[i]; } if (networkUser) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(networkUser.bodyIndexPreference); SurvivorDef survivorDef = SurvivorCatalog.FindSurvivorDefFromBody(bodyPrefab); if (survivorDef != null) { SurvivorDef survivorDef2 = SurvivorCatalog.GetSurvivorDef(characterPad.displaySurvivorIndex); bool flag = true; if (survivorDef2 != null && survivorDef2.bodyPrefab == bodyPrefab) { flag = false; } if (flag) { GameObject displayPrefab = survivorDef.displayPrefab; this.ClearPadDisplay(characterPad); if (displayPrefab) { characterPad.displayInstance = UnityEngine.Object.Instantiate <GameObject>(displayPrefab, characterPad.padTransform.position, characterPad.padTransform.rotation, characterPad.padTransform); } characterPad.displaySurvivorIndex = survivorDef.survivorIndex; } } else { this.ClearPadDisplay(characterPad); } } else { this.ClearPadDisplay(characterPad); } if (!characterPad.padTransform) { return; } this.characterDisplayPads[i] = characterPad; if (this.characterDisplayPads[i].padTransform) { this.characterDisplayPads[i].padTransform.gameObject.SetActive(this.characterDisplayPads[i].displayInstance != null); } } } if (!RoR2Application.isInSinglePlayer) { bool flag2 = this.IsClientReady(); this.readyButton.gameObject.SetActive(!flag2); this.unreadyButton.gameObject.SetActive(flag2); } }
// Token: 0x06002219 RID: 8729 RVA: 0x000936D8 File Offset: 0x000918D8 private void Update() { this.SetEventSystem(this.eventSystemLocator.eventSystem); if (this.previousSurvivorIndex != this.selectedSurvivorIndex) { this.RebuildLocal(); this.previousSurvivorIndex = this.selectedSurvivorIndex; } if (this.characterDisplayPads.Length != 0) { List <NetworkUser> sortedNetworkUsersList = this.GetSortedNetworkUsersList(); for (int i = 0; i < this.characterDisplayPads.Length; i++) { ref CharacterSelectController.CharacterPad ptr = ref this.characterDisplayPads[i]; NetworkUser networkUser = null; if (i < sortedNetworkUsersList.Count) { networkUser = sortedNetworkUsersList[i]; } if (networkUser) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(networkUser.bodyIndexPreference); SurvivorDef survivorDef = SurvivorCatalog.FindSurvivorDefFromBody(bodyPrefab); if (survivorDef != null) { SurvivorDef survivorDef2 = SurvivorCatalog.GetSurvivorDef(ptr.displaySurvivorIndex); bool flag = true; if (survivorDef2 != null && survivorDef2.bodyPrefab == bodyPrefab) { flag = false; } if (flag) { GameObject displayPrefab = survivorDef.displayPrefab; this.ClearPadDisplay(ptr); if (displayPrefab) { ptr.displayInstance = UnityEngine.Object.Instantiate <GameObject>(displayPrefab, ptr.padTransform.position, ptr.padTransform.rotation, ptr.padTransform); } ptr.displaySurvivorIndex = survivorDef.survivorIndex; this.OnNetworkUserLoadoutChanged(networkUser); } } else { this.ClearPadDisplay(ptr); } } else { this.ClearPadDisplay(ptr); } if (!ptr.padTransform) { return; } if (this.characterDisplayPads[i].padTransform) { this.characterDisplayPads[i].padTransform.gameObject.SetActive(this.characterDisplayPads[i].displayInstance != null); } } }