public bool IsHit(int level) { this.lastHitProgress = this.progress; if (this.TypeEnum == TBSUi.HitType.right) { this.lastHitProgress = this.totalWith - this.lastHitProgress; } int num = this.hitAreaLeft + this.hitAreaWith; Log.Info("lastHitProgress: " + this.lastHitProgress); Log.Info(string.Concat(new object[] { "hitAreaLeft: ", this.hitAreaLeft, "max", num })); bool flag = this.lastHitProgress >= (float)(this.hitAreaLeft - 1) && this.lastHitProgress <= (float)num; if (flag) { this.lastHitProgress = -1f; this.SetDifficulty(level); if (App.State.Statistic.TBSScore < App.State.Crits.Score(App.State.GameSettings.TBSEyesIsMirrored) + 1) { App.State.Statistic.TBSScore = App.State.Crits.Score(App.State.GameSettings.TBSEyesIsMirrored) + 1; Leaderboards.SubmitStat(LeaderBoardType.TBSScore, App.State.Crits.Score(App.State.GameSettings.TBSEyesIsMirrored) + 1, false); } } return(flag); }
private void CheckHighestPower(AfkyGame game) { if (App.State.Statistic.AfkyGodPower < game.Power.Level) { App.State.Statistic.AfkyGodPower = game.Power.Level; Leaderboards.SubmitStat(LeaderBoardType.AfkyGodPower, App.State.Statistic.AfkyGodPower.ToInt(), false); } }
//[DebuggerHidden] //internal IEnumerator InitAvatarImages() //{ // return new UpdateStats.<InitAvatarImages>c__Iterator9(); //} //private void UpdateSlower() //{ // if (App.State == null || OfflineCalc.IsCalculating) // { // return; // } // if (this.lastUpdateStats500 == 0L) // { // this.lastUpdateStats500 = UpdateStats.CurrentTimeMillis(); // } // long num = UpdateStats.CurrentTimeMillis() - this.lastUpdateStats500; // this.timerStack500 += num; // this.lastUpdateStats500 = UpdateStats.CurrentTimeMillis(); // if (this.timerStack500 < 500L) // { // return; // } // if (App.CurrentPlattform == Plattform.Steam) // { // Leaderboards.Instance.HandleScoreUploads(); // SteamHelper.CheckAchievements(); // } // num = 500L; // UpdateStats.TimeSinceLastOnlineRequestMS += num; // this.timerStack500 -= num; // InfoArea.TimeSincePressed += (int)num; // this.calculateCount++; // if (UpdateStats.InitSaveOnline) // { // UpdateStats.InitSaveOnline = false; // base.StartCoroutine(this.SaveToServer()); // } // else if (UpdateStats.InitLoadOnline) // { // UpdateStats.InitLoadOnline = false; // base.StartCoroutine(this.LoadFromServer()); // } // foreach (PetCampaign current in App.State.Ext.AllCampaigns) // { // current.UpdateDuration(num); // } // MainUi.CheckAlertButton(App.State); // App.State.UpdateAllInfoTexts(); // App.State.CheckIfAchievementChallengeFinished(); // Creation.UpdateDurationMulti(App.State); // App.State.CheckMightBoni(); // App.State.Generator.UpdateCloneFillSpeedText(); // App.UpdateResolutionInfo(); // App.State.Multiplier.UpdatePetMultis(App.State); // App.State.PremiumBoni.CheckGPBoniValues(); // App.State.PremiumBoni.CheckCrystalBonus(App.State); // App.State.Ext.Factory.UpdateDuration(num, App.State, false); // App.State.CheckMight(); // App.State.CheckForAchievements(); // if (App.State.IsCrystalFactoryAvailable && App.State.GameSettings.AutofillDefenders && App.State.GameSettings.MaxDefenderClones > 0 && App.State.Ext.Factory.DefenderClones.ToInt() != App.State.GameSettings.MaxDefenderClones) // { // App.State.Ext.Factory.RemoveCloneCount(App.State.Ext.Factory.DefenderClones); // CDouble cDouble = App.State.GetAvailableClones(false); // if (cDouble > App.State.GameSettings.MaxDefenderClones) // { // cDouble = App.State.GameSettings.MaxDefenderClones; // } // App.State.Ext.Factory.AddCloneCount(cDouble); // } // if (this.calculateCount > 100) // { // App.State.RecalculateAchievementMultis(); // this.calculateCount = 0; // } // UpdateStats.DivGenEmpty = (App.State.Generator.IsBuilt && App.State.Generator.FilledCapacity <= 0); // App.State.CheckForCheats(); // UpdateStats.PetLowestHunger = 100; // foreach (Pet current2 in App.State.Ext.AllPets) // { // if (current2.IsUnlocked) // { // current2.UpdateFeedTimerMultis(); // if (!current2.IsInCampaign) // { // if (current2.FeedTimer < 4320000L) // { // UpdateStats.PetLowestHunger = 10; // } // else if (current2.FeedTimer < 21600000L) // { // UpdateStats.PetLowestHunger = 50; // } // else if (current2.FeedTimer < 32400000L) // { // UpdateStats.PetLowestHunger = 75; // } // } // } // } // App.State.PremiumBoni.TimeForNextLuckyDraw -= num; // if (App.State.PremiumBoni.TimeForNextDailyPack >= 0L) // { // App.State.PremiumBoni.TimeForNextDailyPack -= num; // } // App.State.Statistic.TimePlayed += num; // App.State.Statistic.TimePlayedSinceRebirth += num; // App.State.Ext.TimeSinceSteam += num; // if (App.State.Statistic.HasStartedDoubleRebirthChallenge) // { // App.State.Statistic.TimeAfterDRCStarted += num; // } // if (App.State.Statistic.HasStartedUltimateBaalChallenge) // { // App.State.Statistic.TimeAfterUBCStarted += num; // } // if (App.State.Statistic.HasStartedArtyChallenge) // { // App.State.Statistic.TimeAfterUACStarted += num; // } // if (App.State.Statistic.HasStartedUniverseChallenge) // { // App.State.Statistic.TimeAfterUUCStarted += num; // } // if (App.State.Statistic.HasStarted1kChallenge) // { // App.State.Statistic.TimeAfter1KCStarted += num; // } // if (App.State.Statistic.HasStartedNoRbChallenge) // { // App.State.Statistic.TimeAfterNoRbStarted += num; // } // if (App.State.Statistic.HasStartedBlackHoleChallenge) // { // App.State.Statistic.TimeAfterBHCStarted += num; // } // if (App.State.Statistic.HasStartedUltimatePetChallenge) // { // App.State.Statistic.TimeAfterUPCStarted += num; // } // foreach (Creation current3 in App.State.AllCreations) // { // current3.count.Round(); // } // Monument monument = App.State.AllMonuments.FirstOrDefault((Monument x) => x.TypeEnum == Monument.MonumentType.black_hole); // if (monument != null && monument.Level > 0) // { // monument.ShouldUpdateText = true; // App.State.Statistic.BlackHoleGPTimer += num; // if (App.State.Statistic.BlackHoleGPTimer > 3600000) // { // App.State.Statistic.BlackHoleGPTimer = 0; // int num2 = (monument.Level * 25).ToInt(); // if (UnityEngine.Random.Range(0, 100) < num2) // { // Statistic expr_770 = App.State.Statistic; // expr_770.GPFromBlackHole = ++expr_770.GPFromBlackHole; // App.State.PremiumBoni.GodPower++; // App.State.PremiumBoni.CheckIfGPIsAdjusted(); // } // if (App.State.Statistic.BlackHoleChallengesFinished > 0) // { // int num3 = (App.State.Statistic.BlackHoleChallengesFinished * 5).ToInt(); // if (monument.Level < App.State.Statistic.BlackHoleChallengesFinished) // { // num3 = (monument.Level * 5).ToInt(); // } // if (num3 > 100) // { // Statistic expr_832 = App.State.Statistic; // expr_832.GPFromBlackHole = ++expr_832.GPFromBlackHole; // App.State.PremiumBoni.GodPower++; // num3 -= 100; // } // if (UnityEngine.Random.Range(0, 100) < num3) // { // Statistic expr_879 = App.State.Statistic; // expr_879.GPFromBlackHole = ++expr_879.GPFromBlackHole; // App.State.PremiumBoni.GodPower++; // } // App.State.PremiumBoni.CheckIfGPIsAdjusted(); // } // } // } // if (App.State.HomePlanet.UpgradeLevel > 50) // { // App.State.HomePlanet.UpgradeLevel = 50; // } //} private void UpdateAchievementCount() { if (App.State == null) { return; } if (this.oldSubmittedCount < App.State.Statistic.TotalAchievements) { this.oldSubmittedCount = App.State.Statistic.TotalAchievements.ToInt(); Leaderboards.SubmitStat(LeaderBoardType.Achievements, App.State.Statistic.TotalAchievements.ToInt(), false); Leaderboards.SubmitStat(LeaderBoardType.ClonesCreated, (App.State.Statistic.TotalShadowClonesCreated / 1000).ToInt(), false); Leaderboards.SubmitStat(LeaderBoardType.AfkyClonesKilled, (App.State.Statistic.AfkyClonesKilled / 1000000).ToInt(), false); } }
private void EndGame() { if (this.boss == null && this.Points > App.State.Statistic.GodlyShootScore) { App.State.Statistic.GodlyShootScore = this.Points; Leaderboards.SubmitStat(LeaderBoardType.ScoreGodlyShoot, App.State.Statistic.GodlyShootScore.ToInt(), false); } if (this.boss != null && this.Points > App.State.Statistic.GodlyShootScoreBoss) { App.State.Statistic.GodlyShootScoreBoss = this.Points; Leaderboards.SubmitStat(LeaderBoardType.GodlyShootScoreBoss, App.State.Statistic.GodlyShootScoreBoss.ToInt(), false); } this.isFlying = false; }
private void UpdateAllStats() { long num = UpdateStats.CurrentTimeMillis() - this.lastUpdateStats; this.timerStack += num; this.lastUpdateStats = UpdateStats.CurrentTimeMillis(); if (this.timerStack < 30L || OfflineCalc.IsCalculating) { return; } num = 30L; this.timerStack -= num; if (App.State == null) { return; } if (UpdateStats.TimeLeftForEvent > 0L) { App.State.Statistic.TimeUntilNextChocolate -= num; if (App.State.Statistic.TimeUntilNextChocolate < 0L) { App.State.Statistic.TimeUntilNextChocolate = 1200000L; State2 expr_B4 = App.State.Ext; expr_B4.Chocolate = ++expr_B4.Chocolate; GuiBase.ShowToast("You received 1 chocolate!"); } } App.State.Ext.AfkGame.Update(num); foreach (Training current in App.State.AllTrainings) { current.UpdateDuration(num); } foreach (Skill current2 in App.State.AllSkills) { current2.UpdateDuration(num); } foreach (Fight current3 in App.State.AllFights) { current3.UpdateDuration(num); } foreach (Creation current4 in App.State.AllCreations) { current4.UpdateDuration(num); } foreach (Might current5 in App.State.AllMights) { current5.UpdateDuration(num); } App.State.RecoverHealth(num); App.State.PremiumBoni.UpdateDuration(num); App.State.Generator.UpdateDuration(num); App.State.PrinnyBaal.Fight(num); App.State.Battle.UpdateData(num); SpecialFightUi.UpdateAutoMode(num); App.State.CreatingSpeedBoniDuration -= num; if (App.State.CreatingSpeedBoniDuration < 0L) { App.State.CreatingSpeedBoniDuration = 0L; } if (!App.State.PremiumBoni.TotalMightIsUnlocked) { App.State.PremiumBoni.TotalMightIsUnlocked = (App.State.AllTrainings[App.State.AllTrainings.Count - 1].IsAvailable && App.State.AllSkills[App.State.AllSkills.Count - 1].IsAvailable); if (App.State.PremiumBoni.TotalMightIsUnlocked && !App.State.Statistic.HasStartedArtyChallenge && !App.State.Statistic.HasStartedUltimateBaalChallenge) { foreach (Might current6 in App.State.AllMights) { CDouble cDouble = App.State.Statistic.DoubleRebirthChallengesFinished; if (cDouble > 50) { cDouble = 50; } current6.Level += cDouble; App.State.PremiumBoni.TotalMight += (long)cDouble.ToInt(); } } } foreach (Monument current7 in App.State.AllMonuments) { current7.UpdateDuration(num); if (App.State.Statistic.HasStartedBlackHoleChallenge && current7.TypeEnum == Monument.MonumentType.black_hole) { MonumentUpgrade upgrade = current7.Upgrade; if (current7.Level > 0 && upgrade.Level > 0) { App.State.Statistic.HasStartedBlackHoleChallenge = false; if (App.State.Statistic.FastestBHCallenge <= 0 || App.State.Statistic.FastestBHCallenge > App.State.Statistic.TimeAfterBHCStarted) { App.State.Statistic.FastestBHCallenge = App.State.Statistic.TimeAfterBHCStarted; Leaderboards.SubmitStat(LeaderBoardType.FastestBHCallenge, (int)(App.State.Statistic.FastestBHCallenge.ToLong() / 1000L), false); } App.State.Statistic.TimeAfterBHCStarted = 0; Statistic expr_542 = App.State.Statistic; expr_542.BlackHoleChallengesFinished = ++expr_542.BlackHoleChallengesFinished; App.SaveGameState(); GuiBase.ShowToast("You finished your black hole challenge!"); } } } foreach (Pet current8 in App.State.Ext.AllPets) { current8.UpdateDuration(num); } App.State.HomePlanet.UpdateDuration(num); if (HeroImage.ShouldInitRessources) { //base.StartCoroutine(this.InitAvatarImages()); } }