// Token: 0x06001CBB RID: 7355 RVA: 0x0007AE2C File Offset: 0x0007902C public string ToLocalNumeric() { StatDataType dataType = this.dataType; if (dataType == StatDataType.ULong) { return(TextSerialization.ToStringNumeric(this.value.ulongValue)); } if (dataType != StatDataType.Double) { throw new ArgumentOutOfRangeException(); } return(TextSerialization.ToStringNumeric(this.value.doubleValue)); }
// Token: 0x06002404 RID: 9220 RVA: 0x0009DC50 File Offset: 0x0009BE50 public void Update() { this.coinSoundCooldown -= Time.deltaTime; if (this.targetText) { if (this.updateTimer <= 0f) { int num = 0; if (this.displayAmount != this.targetValue) { int num2; num = Math.DivRem(this.targetValue - this.displayAmount, 3, out num2); if (num2 != 0) { num += Math.Sign(num2); } if (num > 0) { if (this.coinSoundCooldown <= 0f) { this.coinSoundCooldown = 0.025f; Util.PlaySound(this.sound, RoR2Application.instance.gameObject); } if (this.flashPanel) { this.flashPanel.Flash(); } } this.displayAmount += num; } float num3 = Mathf.Min(0.5f / (float)num, 0.25f); this.targetText.text = TextSerialization.ToStringNumeric((double)this.displayAmount); this.updateTimer = num3; } this.updateTimer -= Time.deltaTime; } }
// Token: 0x060022DB RID: 8923 RVA: 0x00097B3C File Offset: 0x00095D3C private void AssignStatToStrip([CanBeNull] StatSheet srcStatSheet, [NotNull] StatDef statDef, GameObject destStatStrip) { string arg = "0"; ulong value = 0UL; if (srcStatSheet != null) { arg = srcStatSheet.GetStatDisplayValue(statDef); value = srcStatSheet.GetStatPointValue(statDef); } string @string = Language.GetString(statDef.displayToken); string text = string.Format(Language.GetString("STAT_NAME_VALUE_FORMAT"), @string, arg); destStatStrip.transform.Find("StatNameLabel").GetComponent <TextMeshProUGUI>().text = text; string string2 = Language.GetString("STAT_POINTS_FORMAT"); destStatStrip.transform.Find("PointValueLabel").GetComponent <TextMeshProUGUI>().text = string.Format(string2, TextSerialization.ToStringNumeric(value)); }
// Token: 0x060022DA RID: 8922 RVA: 0x0009788C File Offset: 0x00095A8C private void SetPlayerInfo([CanBeNull] RunReport.PlayerInfo playerInfo) { ulong num = 0UL; if (playerInfo != null) { StatSheet statSheet = playerInfo.statSheet; this.AllocateStatStrips(this.statsToDisplay.Length); for (int i = 0; i < this.statsToDisplay.Length; i++) { string text = this.statsToDisplay[i]; StatDef statDef = StatDef.Find(text); if (statDef == null) { Debug.LogWarningFormat("GameEndReportPanelController.SetStatSheet: Could not find stat def \"{0}\".", new object[] { text }); } else { this.AssignStatToStrip(statSheet, statDef, this.statStrips[i]); num += statSheet.GetStatPointValue(statDef); } } int unlockableCount = statSheet.GetUnlockableCount(); int num2 = 0; for (int j = 0; j < unlockableCount; j++) { if (!statSheet.GetUnlockable(j).hidden) { num2++; } } this.AllocateUnlockStrips(num2); int num3 = 0; for (int k = 0; k < unlockableCount; k++) { UnlockableDef unlockable = statSheet.GetUnlockable(k); if (!unlockable.hidden) { this.AssignUnlockToStrip(unlockable, this.unlockStrips[num3]); num3++; } } if (this.itemInventoryDisplay) { this.itemInventoryDisplay.SetItems(playerInfo.itemAcquisitionOrder, playerInfo.itemAcquisitionOrder.Length, playerInfo.itemStacks); this.itemInventoryDisplay.UpdateDisplay(); } } else { this.AllocateStatStrips(0); this.AllocateUnlockStrips(0); if (this.itemInventoryDisplay) { this.itemInventoryDisplay.ResetItems(); } } string @string = Language.GetString("STAT_POINTS_FORMAT"); this.totalPointsLabel.text = string.Format(@string, TextSerialization.ToStringNumeric(num)); GameObject gameObject = null; if (playerInfo != null) { gameObject = BodyCatalog.GetBodyPrefab(playerInfo.bodyIndex); } string arg = ""; Texture texture = null; if (gameObject) { texture = gameObject.GetComponent <CharacterBody>().portraitIcon; arg = Language.GetString(gameObject.GetComponent <CharacterBody>().baseNameToken); } string string2 = Language.GetString("STAT_CLASS_NAME_FORMAT"); this.playerBodyLabel.text = string.Format(string2, arg); this.playerBodyPortraitImage.texture = texture; GameObject gameObject2 = null; if (playerInfo != null) { gameObject2 = BodyCatalog.GetBodyPrefab(playerInfo.killerBodyIndex); } string string3 = Language.GetString("UNIDENTIFIED"); Texture texture2 = Resources.Load <Texture>("Textures/MiscIcons/texMysteryIcon"); if (gameObject2) { Texture portraitIcon = gameObject2.GetComponent <CharacterBody>().portraitIcon; string baseNameToken = gameObject2.GetComponent <CharacterBody>().baseNameToken; if (portraitIcon != null) { texture2 = portraitIcon; } if (!Language.IsTokenInvalid(baseNameToken)) { string3 = Language.GetString(gameObject2.GetComponent <CharacterBody>().baseNameToken); } } string string4 = Language.GetString("STAT_KILLER_NAME_FORMAT"); this.killerBodyLabel.text = string.Format(string4, string3); this.killerBodyPortraitImage.texture = texture2; this.killerPanelObject.SetActive(true); }