// Token: 0x06000674 RID: 1652 RVA: 0x0001D0A8 File Offset: 0x0001B2A8
 private void GameEnded(LevelManager.WinState winState)
 {
     if (winState == LevelManager.WinState.None)
     {
         return;
     }
     this.addedPoints = 0;
     UIEndScreen.SetStats("Peaceful Ragdolls in Base", 0);
     UIEndScreen.SetValues(this.totalAcceptableRagdolls.ToString(), 0);
     if (this.totalAcceptableRagdolls > GameData.highScores.fortInvasionGoodEntered || GameData.highScores.fortInvasionNewSave)
     {
         UIEndScreen.SetBestValues(this.totalAcceptableRagdolls.ToString(), 0);
     }
     else
     {
         UIEndScreen.SetBestValues(GameData.highScores.fortInvasionGoodEntered.ToString(), 0);
     }
     UIEndScreen.SetStats("Invader-dolls in Base", 1);
     UIEndScreen.SetValues(this.totalUnacceptableRagdolls.ToString(), 1);
     if (this.totalUnacceptableRagdolls < GameData.highScores.fortInvasionBadEntered || GameData.highScores.fortInvasionNewSave)
     {
         UIEndScreen.SetBestValues(this.totalUnacceptableRagdolls.ToString(), 1);
     }
     else
     {
         UIEndScreen.SetBestValues(GameData.highScores.fortInvasionBadEntered.ToString(), 1);
     }
     if (winState == LevelManager.WinState.Lose)
     {
         this.addedPoints += 75;
     }
     else
     {
         this.addedPoints += Mathf.RoundToInt((float)(10 * (10 - 10 * (this.totalUnacceptableRagdolls / this.loseOnUnacceptableRagdollLimit))));
         this.addedPoints += Mathf.RoundToInt((float)(this.totalAcceptableRagdolls * 10));
     }
     GameData.stats.XP += this.addedPoints;
     GameData.SaveStats();
     if (this.totalAcceptableRagdolls > GameData.highScores.fortInvasionGoodEntered || GameData.highScores.fortInvasionNewSave)
     {
         GameData.highScores.fortInvasionGoodEntered = this.totalAcceptableRagdolls;
     }
     if (this.totalUnacceptableRagdolls < GameData.highScores.fortInvasionBadEntered || GameData.highScores.fortInvasionNewSave)
     {
         GameData.highScores.fortInvasionBadEntered = this.totalUnacceptableRagdolls;
     }
     GameData.highScores.fortInvasionNewSave = false;
     GameData.SaveHighScores();
 }
Exemple #2
0
 // Token: 0x06000685 RID: 1669 RVA: 0x0001D328 File Offset: 0x0001B528
 private void SendStats(LevelManager.WinState winState)
 {
     this.addedPoints = 0;
     this.time        = Mathf.Round(this.time * 10f) / 10f;
     UIEndScreen.SetStats("Time (Whip's Mod used)", 0);
     UIEndScreen.SetValues(this.time.ToString() + "s", 0);
     if (this.time < GameData.highScores.roadCrossTime || GameData.highScores.roadCrossNewSave)
     {
         UIEndScreen.SetBestValues(this.time.ToString() + "s", 0);
     }
     else
     {
         UIEndScreen.SetBestValues(GameData.highScores.roadCrossTime.ToString() + "s", 0);
     }
     UIEndScreen.SetStats("Ragdoll Count", 1);
     UIEndScreen.SetValues(this.ragdollCount.ToString(), 1);
     if (this.ragdollCount < GameData.highScores.roadCrossRagdollCount || GameData.highScores.roadCrossNewSave)
     {
         UIEndScreen.SetBestValues(this.ragdollCount.ToString(), 1);
     }
     else
     {
         UIEndScreen.SetBestValues(GameData.highScores.roadCrossRagdollCount.ToString(), 1);
     }
     if (this.ragdollCount < GameData.highScores.roadCrossRagdollCount || GameData.highScores.roadCrossNewSave)
     {
         GameData.highScores.roadCrossRagdollCount = this.ragdollCount;
     }
     if (this.time < GameData.highScores.roadCrossTime || GameData.highScores.roadCrossNewSave)
     {
         GameData.highScores.roadCrossTime = this.time;
     }
     if (GameData.highScores.roadCrossNewSave)
     {
         GameData.highScores.roadCrossNewSave = false;
     }
     this.addedPoints  += Mathf.RoundToInt(Mathf.Clamp(1200f - this.time * 8f, 0f, 1200f));
     this.addedPoints  += Mathf.RoundToInt(Mathf.Clamp(1000f - (float)this.ragdollCount * 100f, 0f, 1000f));
     GameData.stats.XP += this.addedPoints;
     GameData.SaveStats();
 }