private void ShowKongregateConnect(int marginLeft, int marginTop)
        {
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Kongregate an input the Kongregate Name and Id to the input-fields below.");
            marginTop += 60;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Id: ");
            string s = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongIdInput.ToString());

            long.TryParse(s, out ConnectArea.KongIdInput);
            marginTop += 40;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Name: ");
            ConnectArea.KongNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongNameInput);
            marginTop += 60;
            if (App.CurrentPlattform == Plattform.Steam)
            {
                GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "If you get the Kongregate Save, you can't get achievements in Steam!");
                marginTop += 35;
            }
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Kongregate Save", "This will overwrite your current save, then import the online save from Kongregate, if the id and name are correct. Loading online in Kongregate will then connect your saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.GetKongSaveAfterConnecting = true;
            }
            marginTop += 40;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Kongregate Save", "This will overwrite your Kongregate online save if the id and name are correct. Loading online in Kongregate will then move your current save to Kongregate and connect the saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.OverwriteKongSave = true;
            }
        }
 private void Start(AreaGodlyShoot.Boss boss = null)
 {
     this.AllShots    = new List <AreaGodlyShoot.Element>();
     this.AllBoulders = new List <AreaGodlyShoot.Element>();
     this.AllClouds   = new List <AreaGodlyShoot.Element>();
     this.BossShoots  = new List <AreaGodlyShoot.Element>();
     this.Lasers      = new List <AreaGodlyShoot.Element>();
     this.Points      = 0;
     this.isFlying    = true;
     this.marginTop   = 200f;
     this.marginLeft  = 100f;
     this.time        = 0L;
     this.timeMs      = UpdateStats.CurrentTimeMillis();
     this.multi       = 0f;
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.AddCloud((float)UnityEngine.Random.Range(0, 900));
     this.boss       = boss;
     this.timeMsMove = UpdateStats.CurrentTimeMillis();
     this.Player     = new AreaGodlyShoot.Element(this.Avatar, this.marginLeft, this.marginTop, 100f, 100f);
     if (Application.targetFrameRate != 60)
     {
         Application.targetFrameRate = 60;
         QualitySettings.vSyncCount  = 0;
     }
 }
        internal void Update()
        {
            if (!AreaGodlyShoot.IsShown)
            {
                return;
            }
            if (Input.GetKey(KeyCode.C))
            {
                if (this.boss == null)
                {
                    this.Start(null);
                }
                else
                {
                    this.Start(new AreaGodlyShoot.Boss(this.ImageBoss, 600f, 250f, 200f, 200f, 1));
                }
            }
            if (!this.isFlying)
            {
                return;
            }
            if (this.timeMsMove == 0L)
            {
                this.timeMsMove = UpdateStats.CurrentTimeMillis();
            }
            long num = UpdateStats.CurrentTimeMillis() - this.timeMsMove;

            this.timeMsMove = UpdateStats.CurrentTimeMillis();
            long num2 = num / 12L;
            long num3 = UpdateStats.CurrentTimeMillis() - this.autoshootTimer;

            if (num3 > 200L)
            {
                this.autoshootTimer = UpdateStats.CurrentTimeMillis();
                this.AllShots.Add(new AreaGodlyShoot.Element(this.ImageShot, this.marginLeft + 30f, this.marginTop, 30f, 20f));
            }
            if (Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.A))
            {
                this.marginLeft -= (float)(5L * num2);
            }
            if (Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W))
            {
                this.marginTop -= (float)(7L * num2);
            }
            if (Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D))
            {
                this.marginLeft += (float)(5L * num2);
            }
            if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S))
            {
                this.marginTop += (float)(5L * num2);
            }
        }
 private static void addPurchaseButton(int left, int top, Purchase purchaseId, int count)
 {
     if (GUI.Button(new Rect(GuiBase.Width((float)left), GuiBase.Height((float)top), GuiBase.Width(180f), GuiBase.Height(32f)), new GUIContent(string.Concat(new object[]
     {
         "Buy ",
         count,
         " for ",
         //Purchases.GetPriceText(purchaseId)
     }))))
     {
         SteamHelper.TimerSinceStarted = UpdateStats.CurrentTimeMillis();
         SteamHelper.PurchaseItem(purchaseId);
     }
 }
Beispiel #5
0
 private void LoadOnline()
 {
     if (UpdateStats.TimeSinceLastOnlineRequest < 60L)
     {
         GuiBase.ShowToast("You need to wait another " + (60L - UpdateStats.TimeSinceLastOnlineRequest) + " seconds to load your online save.");
     }
     else
     {
         GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
         {
             UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.UserRequest);
         }, delegate
         {
         }, "Yes", "No", false, false);
     }
 }
 private void ShowAndroidConnect(int marginLeft, int marginTop)
 {
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Android an input the Android Name and Id to the input-fields below.");
     marginTop += 60;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Id: ");
     ConnectArea.AndroidIdInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidIdInput);
     marginTop += 40;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Name: ");
     ConnectArea.AndroidNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidNameInput);
     marginTop += 50;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Android Save", "This will overwrite your current save, then import the online save from Android, if the id and name are correct. Loading online in Android will then connect your saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.GetAndroidSaveAfterConnecting = true;
     }
     marginTop += 40;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Android Save", "This will overwrite your Android online save if the id and name are correct. Loading online in Android will then move your current save to Android and connect the saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.OverwriteAndroidSave = true;
     }
 }
        private void ShowSteamConnect(int marginLeft, int marginTop)
        {
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Steam an input the Steam Name and Id to the input-fields below.");
            marginTop += 60;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Steam Id: ");
            string s = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.SteamIdInput.ToString());

            long.TryParse(s, out ConnectArea.SteamIdInput);
            marginTop += 40;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Steam Name: ");
            ConnectArea.SteamNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.SteamNameInput);
            marginTop += 60;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Steam Save", "This will overwrite your current save, then import the online save from Steam, if the id and name are correct. Loading online in Steam will then connect your saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.GetSteamSaveAfterConnecting = true;
            }
            marginTop += 40;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Steam Save", "This will overwrite your Steam online save if the id and name are correct. Loading online in Steam will then move your current save to Steam and connect the saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.OverwriteSteamSave = true;
            }
        }
        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());
            }
        }
        private void show()
        {
            if (this.lastScreenWidth != (float)Screen.width)
            {
                this.lastScreenWidth = (float)Screen.width;
                TBSUi.ScreenChanged  = true;
            }
            this.lastScreenWidth = (float)Screen.width;
            if (this.timeMs == 0L)
            {
                this.timeMs = UpdateStats.CurrentTimeMillis();
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(20);
            GUI.BeginGroup(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            if (App.State.Statistic.HighestGodDefeated < 28 || App.State.Statistic.HasStartedArtyChallenge)
            {
                GUI.Label(new Rect(GuiBase.Width(140f), GuiBase.Height(150f), GuiBase.Width(640f), GuiBase.Height(30f)), "You need to defeat Baal to enter 'The Baal Slayer'.", style);
                GUI.EndGroup();
                return;
            }
            style.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(245f), GuiBase.Height(10f), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("The Baal Slayer"));
            style.fontSize = GuiBase.FontSize(16);
            string text = "Info";

            if (this.showInfo)
            {
                text = "Back";
            }
            if (!this.showBP && GUI.Button(new Rect(GuiBase.Width(450f), GuiBase.Height(10f), GuiBase.Width(65f), GuiBase.Height(30f)), text))
            {
                this.showInfo = !this.showInfo;
            }
            string text2 = "Baal Power";

            if (this.showBP)
            {
                text2 = "Back";
            }
            if (!this.showInfo && GUI.Button(new Rect(GuiBase.Width(530f), GuiBase.Height(10f), GuiBase.Width(100f), GuiBase.Height(30f)), text2))
            {
                this.showBP = !this.showBP;
            }
            if (this.showInfo)
            {
                style.fontStyle = FontStyle.Normal;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(80f), GuiBase.Width(580f), GuiBase.Height(400f)), "Hit different body-parts to increase the critical chance and damage when fighting gods. Critical damage will always ignore the defense.\nAll P. Baals have 100% critical chance and 500% critical damage. Now you can beat that!\nClick 'Start' and then 'Hit' when the blue progress is within the white box. If your timing is right, it increases the level of the nearest body part by 1, if it is wrong, it decreases the level by 1.\nThe difficulty increases with higher levels.\nEvery level from Wings, Tail, Mouth and Feet will increase the critical damage by 1% and every level to the eyes will increase the chance by 1. \nThe eyes are special, you have to hit an invisible white box where it is mirrored on the blue line. Alternatively you can play it normal but then you only get 1 score each level and 1 % crit every 2.5 levels.\nThe maximum chance is 100% and the maximum damage is 1000%");
            }
            else if (this.showBP)
            {
                this.showBPOptions();
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(40f), GuiBase.Height(50f), GuiBase.Width(250f), GuiBase.Height(30f)), "Critical Chance % " + App.State.Crits.CriticalPercent(App.State.GameSettings.TBSEyesIsMirrored));
                GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height(50f), GuiBase.Width(250f), GuiBase.Height(30f)), "Critical Damage % " + App.State.Crits.CriticalDamage);
                GUI.Label(new Rect(GuiBase.Width(450f), GuiBase.Height(50f), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Score " + App.State.Crits.Score(App.State.GameSettings.TBSEyesIsMirrored), "Eyes count 4x if mirrored and all other levels count 1x. This is added to your statistic multi and highscore."));
                style.fontStyle = FontStyle.Normal;
                GUI.DrawTexture(new Rect(GuiBase.Width(210f), GuiBase.Height(120f), GuiBase.Width(250f), GuiBase.Height(250f)), TBSUi.prinny);
                string arg     = string.Empty;
                string tooltip = string.Empty;
                int    num     = App.State.Crits.EyesNoMirror;
                if (App.State.GameSettings.TBSEyesIsMirrored)
                {
                    arg     = " (mirrored)";
                    tooltip = "This one is mirrored. Hit where the white box would be mirrored from the blue line in the center.";
                    num     = App.State.Crits.Eyes;
                }
                GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height(140f), GuiBase.Width(175f), GuiBase.Height(30f)), new GUIContent("Eyes Lv " + num + arg, tooltip));
                GUI.Label(new Rect(GuiBase.Width(165f), GuiBase.Height(230f), GuiBase.Width(100f), GuiBase.Height(30f)), "Wings Lv " + App.State.Crits.Wings);
                GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height(330f), GuiBase.Width(100f), GuiBase.Height(30f)), "Tail Lv " + App.State.Crits.Tail);
                GUI.Label(new Rect(GuiBase.Width(390f), GuiBase.Height(320f), GuiBase.Width(100f), GuiBase.Height(30f)), "Feet Lv " + App.State.Crits.Feet);
                GUI.Label(new Rect(GuiBase.Width(400f), GuiBase.Height(150f), GuiBase.Width(100f), GuiBase.Height(30f)), "Mouth Lv " + App.State.Crits.Mouth);
                long timeProgressed = UpdateStats.CurrentTimeMillis() - this.timeMs;
                this.timeMs = UpdateStats.CurrentTimeMillis();
                if (App.State.GameSettings.TBSEyesIsMirrored)
                {
                    App.State.Crits.Eyes = this.CreateProgressGame(50, 80, this.eyesGame, App.State.Crits.Eyes, TBSUi.HitType.eyes, timeProgressed);
                }
                else
                {
                    App.State.Crits.EyesNoMirror = this.CreateProgressGame(50, 80, this.eyesNonMirrorGame, App.State.Crits.EyesNoMirror, TBSUi.HitType.eyes_non_mirror, timeProgressed);
                }
                App.State.Crits.Wings = this.CreateProgressGame(30, 210, this.wingsGame, App.State.Crits.Wings, TBSUi.HitType.top, timeProgressed);
                App.State.Crits.Tail  = this.CreateProgressGame(100, 360, this.tailGame, App.State.Crits.Tail, TBSUi.HitType.left, timeProgressed);
                App.State.Crits.Feet  = this.CreateProgressGame(350, 350, this.feetGame, App.State.Crits.Feet, TBSUi.HitType.right, timeProgressed);
                App.State.Crits.Mouth = this.CreateProgressGame(480, 180, this.mouthGame, App.State.Crits.Mouth, TBSUi.HitType.bottom, timeProgressed);
                TBSUi.ScreenChanged   = false;
                App.State.GameSettings.TBSEyesIsMirrored = GUI.Toggle(new Rect(GuiBase.Width(220f), GuiBase.Height(110f), GuiBase.Width(300f), GuiBase.Height(30f)), App.State.GameSettings.TBSEyesIsMirrored, new GUIContent("Mirrored Eyes", "If this is on, you need to hit the white box from the eyes mirrored from the blue line. While mirrored you get 1 % crit each level and 4 score. If it is not mirrored you get 1% crit every 2.5 levels and 1 score each level."));
            }
            GUI.EndGroup();
        }
Beispiel #10
0
        public void Show(GUIStyle labelStyle)
        {
            labelStyle.fontSize  = 16;
            labelStyle.fontStyle = FontStyle.Normal;
            GUIStyle style = GUI.skin.GetStyle("Button");

            style.fontSize = GuiBase.FontSize(15);
            GUI.BeginGroup(new Rect(GuiBase.Width(9f), GuiBase.Height(45f), GuiBase.Width(265f), GuiBase.Height(490f)));
            GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), GuiBase.Width(245f), GuiBase.Height(50f)), new GUIContent("Challenges"));
            App.State.GameSettings.HideMaxedChallenges = GUI.Toggle(new Rect(GuiBase.Width(110f), GuiBase.Height(5f), GuiBase.Width(260f), GuiBase.Height(25f)), App.State.GameSettings.HideMaxedChallenges, new GUIContent("Hide maxed", "If this is on, maxed challenges will be hidden."));
            this.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(0f), GuiBase.Height(35f), GuiBase.Width(245f), GuiBase.Height(310f)), this.scrollPosition, new Rect(0f, GuiBase.Height(0f), GuiBase.Width(225f), GuiBase.Height((float)(this.marginTop + 30))));
            this.marginTop      = 0;
            bool flag = App.State.GameSettings.HideMaxedChallenges && App.State.HomePlanet.UpgradeLevel >= 50;

            if (App.State.HomePlanet.UpgradeLevel >= 5 && !flag && GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Ultimate Universe Challenge", "This is almost like a normal rebirth. You will lose nothing and your time until you create one universe is recorded. If you create a universe, your Planet Level will be increased by one (This means your Powersurge speed will increase).")))
            {
                App.CheckRebirth(delegate(bool x)
                {
                    if (x)
                    {
                        App.Rebirth();
                        App.State.Statistic.HasStartedUniverseChallenge = true;
                        App.State.Statistic.TimeAfterUUCStarted         = 0;
                    }
                }, true);
            }
            bool flag2 = App.State.GameSettings.HideMaxedChallenges && App.State.Statistic.AchievementChallengesFinished >= 50;

            if (App.State.Statistic.UniverseChallengesFinished > 0 && !flag2)
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("All Achievements Challenge", "This is almost like a normal rebirth. You will lose nothing and when you get all achievements available, your achievements will provide 1% more multiplier permanently and it will lower the requirement to get an training or fight achievement by 1% (maxed at 50).")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            App.Rebirth();
                            App.State.Statistic.HasStartedAchievementChallenge = true;
                        }
                    }, true);
                }
            }
            bool flag3 = App.State.GameSettings.HideMaxedChallenges && App.State.Statistic.BlackHoleChallengesFinished >= 40;

            if (App.State.Statistic.AchievementChallengesFinished > 0 && !flag3)
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Black Hole Challenge", "This is like a normal rebirth. It ends after building one black hole with one upgrade. For each challenge you have finished, the cost for building black holes and upgrades will be decreased by 2%.\nIt also adds a chance for passive god power gain of 5% for each black hole build and challenge finished. Maxed at 40 challenges. \n With 40 challenges finished, you will only pay 20% of the orginal cost and 40 black holes built will give you 3 god power every hour.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            App.Rebirth();
                            App.State.Statistic.HasStartedBlackHoleChallenge = true;
                        }
                    }, true);
                }
            }
            bool flag4 = App.State.GameSettings.HideMaxedChallenges && App.State.Statistic.UltimatePetChallengesFinished >= 20;

            if (App.State.Statistic.TotalPetGrowth > 10000 && !flag4)
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Ultimate Pet Challenge", "This is like a normal rebirth but you can't fight gods by yourself. Your pets will fight the gods instead. The god page will show your total pet power for this run and this will be used to fight gods.\nThe challenge is finished when your pets defeat baal. While the challenge is active, your pets can find pet pills in item campaigns which will boost their multiplier until the challenge is over.\nEach challenge finished will increase all rewards from pet campaigns by 5%. Maxed at 100%")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            App.Rebirth();
                            App.State.Statistic.HasStartedUltimatePetChallenge = true;
                            App.State.Ext.PetPowerMultiCampaigns = 1;
                            App.State.Ext.PetPowerMultiGods      = 1;
                            foreach (Creation current in App.State.AllCreations)
                            {
                                current.GodToDefeat.IsDefeatedPetChallenge = false;
                            }
                        }
                    }, true);
                }
            }
            if (!App.State.GameSettings.HideMaxedChallenges || !(App.State.Statistic.DoubleRebirthChallengesFinished >= 50))
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Double Rebirth Challenge", "This is an extra challenge that works like doing two rebirths in a row, resetting your multipliers to their starting values. ONLY recommended if you have a lot of God Power and want a challenge. If you beat Baal again after starting this challenge, you will receive an extra reward.\nAfter starting this challenge, you will gain 1 God Power for defeating the earlier gods for the first time once more.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            GuiBase.ShowDialog("Are you sure?", "This is an extra challenge which will reward you with 10 God Power and 500,000 statistic multi after you defeat Baal again. \nIt will also level up might for each finished challenge by 1 level as soon as you unlock it.\nThis will revert your current stats to the default values!", delegate
                            {
                                GuiBase.ShowDialog("Are you really sure?", "This is no normal rebirth and it will take quite a bit of time to go back to your current progress.", delegate
                                {
                                }, delegate
                                {
                                    App.Rebirth();
                                    App.Rebirth();
                                    App.State.Statistic.HasStartedDoubleRebirthChallenge = true;
                                    App.State.Statistic.TimeAfterDRCStarted = 0;
                                    foreach (Creation current in App.State.AllCreations)
                                    {
                                        current.GodToDefeat.IsDefeatedForFirstTime = false;
                                    }
                                }, "No", "Yes", false, false);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }, false);
                }
            }
            bool flag5 = App.State.GameSettings.HideMaxedChallenges && App.State.Statistic.OnekChallengesFinished >= 40;

            if (App.State.Statistic.DoubleRebirthChallengesFinished > 1 && !flag5)
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("1k Challenge", "This is an extra challenge that works like doing two rebirths in a row, resetting your multipliers to their starting values. Compared to the Double Rebirth Challenge, you will only have 1000 Clones which can't be increased until you finish this challenge (defeat Baal). If you beat Baal again after starting this challenge, you will receive an extra reward.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            GuiBase.ShowDialog("Are you sure?", "This is an extra challenge which will reward you with 20 God Power and 750,000 statistic multi after you defeat Baal again. \nIt will also increase the speed, your clones will level up might by 5%.\nThis will revert your current stats to the default values!", delegate
                            {
                                GuiBase.ShowDialog("Are you really sure?", "This is no normal rebirth and it will take quite a bit of time to go back to your current progress.", delegate
                                {
                                }, delegate
                                {
                                    App.Rebirth();
                                    App.Rebirth();
                                    App.State.Statistic.HasStarted1kChallenge = true;
                                    App.State.Statistic.TimeAfter1KCStarted   = 0;
                                    foreach (Creation current in App.State.AllCreations)
                                    {
                                        current.GodToDefeat.IsDefeatedForFirstTime = false;
                                    }
                                }, "No", "Yes", false, false);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }, false);
                }
            }
            bool flag6 = App.State.GameSettings.HideMaxedChallenges && App.State.Statistic.NoRbChallengesFinished >= 20;

            if (App.State.Statistic.OnekChallengesFinished > 0 && !flag6)
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("No Rebirth Challenge", "This is an extra challenge that works like doing two rebirths in a row, resetting your multipliers to their starting values. Compared to the Double Rebirth Challenge, you can't rebirth until you finish this challenge (defeat Baal). Rebirthing once will cancel this challenge. If you beat Baal again after starting this challenge, you will receive an extra reward.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            GuiBase.ShowDialog("Are you sure?", "This is an extra challenge which will reward you with 250 God Power and 5,000,000 statistic multi after you defeat Baal again. \nUltimate Beings will also appear 1% faster. (Maxed at 20%)\nThis will revert your current stats to the default values!", delegate
                            {
                                GuiBase.ShowDialog("Are you really sure?", "This is no normal rebirth and it will take quite a bit of time to go back to your current progress.", delegate
                                {
                                }, delegate
                                {
                                    App.Rebirth();
                                    App.Rebirth();
                                    App.State.Statistic.HasStartedNoRbChallenge = true;
                                    App.State.Statistic.TimeAfterNoRbStarted    = 0;
                                }, "No", "Yes", false, false);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }, false);
                }
            }
            if (!App.State.GameSettings.HideMaxedChallenges || !(App.State.Statistic.UltimateBaalChallengesFinished + App.State.Statistic.ArtyChallengesFinished * 2 >= 50))
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Ultimate Baal Challenge", "This is similar to the double rebirth challenge, but your current God Power and upgrades will also be locked (defeat Baal again to regain everything that you had before). Max Shadow Clones will be reverted to 1000. Your total might will revert to 0.\nYour reward for beating this challenge will be much bigger than that for the regular double rebirth challenge. This might be the better option if you don't have much God Power and want a challenge.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            GuiBase.ShowDialog("Are you sure?", "This is an extra challenge which will reward you with 100 God Power and 5 million statistic multi after you defeat Baal again. This will revert your current stats to the default values and also remove your God Power and God Power Upgrades. P.Baals will also become weaker by 1% until 50% for each finished challenge.", delegate
                            {
                                UpdateStats.SaveToServer(UpdateStats.ServerSaveType.UBChallengeSave);
                                GuiBase.ShowDialog("Are you really sure?", "This is no normal rebirth and it will take quite a bit of time to go back to your current progress.", delegate
                                {
                                }, delegate
                                {
                                    this.StartUltimateBaalChallenge();
                                }, "No", "Yes", false, false);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }, false);
                }
            }
            if (!App.State.GameSettings.HideMaxedChallenges || !(App.State.Statistic.ArtyChallengesFinished >= 2))
            {
                this.marginTop += 40;
                if (GUI.Button(new Rect(GuiBase.Width(0f), GuiBase.Height((float)this.marginTop), GuiBase.Width(225f), GuiBase.Height(30f)), new GUIContent("Ultimate Arty Challenge", "This isn't worth it, so I'd pass on it. It is similar to anUltimate Baal Challenge (UBC), but you will also lose your training caps, unlocked TBS, need to unlock your Planet again and you have to defeat Baal within 5 rebirths after taking this challenge (The rebirth used for starting this challenge counts as one!).\nOnce you do a 6th rebirth the challenge will chancel, and you will receive no reward. \nIf you finish this challenge, you will receive twice the rewards than you would get from an UBC.")))
                {
                    App.CheckRebirth(delegate(bool x)
                    {
                        if (x)
                        {
                            GuiBase.ShowDialog("Are you sure?", "This is an extra challenge which will reward you with 200 God Power and 10 million statistic multi if you defeat Baal within 4 rebirths. The first time, you will receive the turtle pet and the second time a free pet token. No extra reward after that!\nBeating it faster than in 2000000 seconds ~23 days is almost impossible without cheating, so also no extra reward for that.\nThis will revert your current stats to the default values and also remove your God Power and God Power Upgrades. P.Baals will also become weaker by 2% until 50% for each finished challenge.", delegate
                            {
                                UpdateStats.SaveToServer(UpdateStats.ServerSaveType.UAChallengeSave);
                                GuiBase.ShowDialog("Are you really sure?", "This is no normal rebirth and it will take quite a bit of time to go back to your current progress.", delegate
                                {
                                }, delegate
                                {
                                    this.StartArtyChallenge();
                                }, "No", "Yes", false, false);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }, false);
                }
            }
            GUI.EndScrollView();
            GUI.EndGroup();
        }
Beispiel #11
0
 private void SaveOnline()
 {
     UpdateStats.SaveToServer(UpdateStats.ServerSaveType.UserRequest);
 }
Beispiel #12
0
        public void OnGUI()
        {
            if (!InfoArea.ShowArea || GuiBase.LeftDialogIsShowing || GuiBase.FullScreenDialogIsShowing || AfkUi.Instance.ShowAfk)
            {
                return;
            }
            GUI.skin            = Gui.ChosenSkin;
            GUI.backgroundColor = SettingsUi.Instance.UiColor;
            GUI.Box(new Rect(InfoArea.Width(10f), InfoArea.Height(110f), InfoArea.Width(275f), InfoArea.Height(480f)), string.Empty);
            int      num   = 60;
            GUIStyle style = GUI.skin.GetStyle("Button");

            style.fontSize  = InfoArea.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            GUIStyle style2 = GUI.skin.GetStyle("Label");

            style2.fontSize  = InfoArea.FontSize(14);
            style2.fontStyle = FontStyle.Normal;
            style2.alignment = TextAnchor.UpperLeft;
            if (this.TouIsShowing)
            {
                this.showTOU(style2);
                return;
            }
            if (this.ImprintIsShowing)
            {
                this.showLegals(style2);
                return;
            }
            if (this.ShowCredits)
            {
                this.showCredits(style2);
                return;
            }
            if (this.PrivacyIsShowing)
            {
                this.showPrivacy(style2);
                return;
            }
            GUI.BeginGroup(new Rect(InfoArea.Width(25f), InfoArea.Height(140f), InfoArea.Width(265f), InfoArea.Height(490f)));
            float x = InfoArea.Width(2f);

            GUI.Label(new Rect(x, InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(50f)), "Version: 2.13.740\nDate: 2017-08-09");
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Connect", "If you want to connect your online save from kongregate to steam, click here for more info.")))
            {
                InfoArea.ShowConnect = !InfoArea.ShowConnect;
            }
            num += 80;
            string text = Application.dataPath + "/Saves/ManualSave.txt";

            if (App.CurrentPlattform == Plattform.Android)
            {
                text = " the internal storage";
            }
            string text2    = "Save";
            string text3    = "Load";
            string tooltip  = "This will save your game to " + text + ".\nYou can load the save with the 'Load' button. The game will never load this automatically.";
            string tooltip2 = "This will load your game from " + text + ". It does nothing, if this is not a valid save or this file does not exist.";

            if (App.CurrentPlattform == Plattform.Kongregate)
            {
                tooltip  = "This will open a dialog where you can save your game data.";
                tooltip2 = "This will open a dialog where you can select previously saved data.";
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent(text2, tooltip)))
            {
                if (App.CurrentPlattform == Plattform.Kongregate)
                {
                    this.SaveWebGl();
                }
                else
                {
                    this.Save(text);
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent(text3, tooltip2)))
            {
                this.Load();
            }
            num += 45;
            string text4 = "This is an additional online save. The game saves online once every 15 minutes automatically. If you need it to save now, just press the button.";

            if (UpdateStats.LastServerSaveTime > 0L)
            {
                long time = UpdateStats.CurrentTimeMillis() - UpdateStats.LastServerSaveTime;
                text4 = text4 + "\nThe last online save was " + Conv.MsToGuiText(time, true) + " ago.";
            }
            else
            {
                text4 += "\nThe game was not saved online yet since you started the game.";
            }
            text4 = text4 + "\nThe next online save will be in: " + Conv.MsToGuiText(UpdateStats.NextOnlineSaveTime, false);
            string str  = "Kongregate";
            bool   flag = !string.IsNullOrEmpty(App.State.KongUserId);

            if (App.CurrentPlattform == Plattform.Steam)
            {
                str  = "Steam";
                flag = !string.IsNullOrEmpty(App.State.SteamId);
            }
            if (App.CurrentPlattform == Plattform.Android)
            {
                flag = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent("Save Online", text4)))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.SaveOnline();
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Load Online", "Loads the online save and overwrites your current save. If you lose your local save, this is the way to get back your game state, if there is an online save. You need to do this within 15 minutes, or the autosave will overwrite your online save.")))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.LoadOnline();
                }
            }
            num += 45;
            int num2 = 114;

            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width((float)num2), InfoArea.Height(35f)), new GUIContent("Credits", "A list of contributers to the game.")))
            {
                this.ShowCredits = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Feedback", "Email the developer to give feedback or report bugs.")))
            {
                this.SendEmail();
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("My Other Games", "Opens my website to show the other games I made.\nBecause it only works as either a popup or it would replace the page, it is shown as a popup. So make sure to view blocked popups if your browser blocks it.")))
            {
                App.OpenWebsite("https://shugasu.com/games");
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Legals")))
            {
                this.ImprintIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(85f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("TOU")))
            {
                this.TouIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(170f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Privacy")))
            {
                this.PrivacyIsShowing = true;
            }
            num += 70;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("Reset game", "This will reset all stats and multipliers to the base values.")))
            {
                this.ResetGame();
            }
            GUI.EndGroup();
            InfoArea.InfoAreaTooltip = GUI.tooltip;
        }
 public void UpdateProgress()
 {
     if (this.isFlying)
     {
         long num = UpdateStats.CurrentTimeMillis() - this.timeMs;
         this.timeMs     = UpdateStats.CurrentTimeMillis();
         this.multi      = (float)(num / 12L);
         this.marginTop += 3f * this.multi;
         this.time      += num;
         this.timeCloud += num;
         int num2 = -1;
         if (this.time > this.newBoulderTimer && this.boss == null)
         {
             this.time = 0L;
             float num3 = (float)UnityEngine.Random.Range(40, 100);
             this.AllBoulders.Add(new AreaGodlyShoot.Element(this.ImageBoulder, (float)UnityEngine.Random.Range(0, 1200), -200f, num3, num3));
         }
         if (this.boss != null)
         {
             this.bossShootTimer         += num;
             this.bossSpecialAttackTimer += num;
             if (this.bossShootTimer > this.bossShoot)
             {
                 if (this.boss.CurrentLevel.ToInt() > 4)
                 {
                     int num4 = 50;
                     if (this.LaserIndexV2 && this.boss.CurrentLevel.ToInt() > 5)
                     {
                         num4 = 10;
                     }
                     this.Lasers.Add(new AreaGodlyShoot.Element(this.ImageLaser, (float)(num4 + this.LaserIndex * 100), -400f, 100f, 364f));
                     this.LaserIndex++;
                     if (this.LaserIndex > 4)
                     {
                         this.LaserIndexV2 = !this.LaserIndexV2;
                         this.LaserIndex   = 0;
                     }
                 }
                 this.bossShootTimer = 0L;
                 this.BossShoots.Add(new AreaGodlyShoot.Element(this.ImageBossShoot, this.boss.marginLeft, this.boss.marginTop + this.boss.height * 0.44f, 90f, 50f));
             }
             if (this.bossSpecialAttackTimer > this.bossSpecialAttack)
             {
                 this.bossSpecialAttackTimer = 0L;
                 for (int i = 0; i < 15; i++)
                 {
                     this.AllBoulders.Add(new AreaGodlyShoot.Element(this.ImageBoulder, (float)(500 + i * 50), (float)(i * 50 - 300), 150f, 150f));
                 }
                 if (this.boss.CurrentLevel.ToInt() > 2)
                 {
                     for (int j = 0; j < 15; j++)
                     {
                         this.AllBoulders.Add(new AreaGodlyShoot.Element(this.ImageBoulder, (float)(400 + j * 50), (float)(j * 50 - 300), 150f, 150f));
                     }
                 }
                 if (this.boss.CurrentLevel.ToInt() > 3)
                 {
                     for (int k = 0; k < 15; k++)
                     {
                         this.AllBoulders.Add(new AreaGodlyShoot.Element(this.ImageBoulder, (float)(300 + k * 50), (float)(k * 50 - 300), 150f, 150f));
                     }
                 }
             }
             for (int l = 0; l < this.BossShoots.Count; l++)
             {
                 AreaGodlyShoot.Element element = this.BossShoots[l];
                 if (element.Check(this.Player))
                 {
                     this.EndGame();
                     return;
                 }
                 if (element.marginLeft < -50f)
                 {
                     num2 = l;
                 }
                 element.Shoot(-8f * this.multi);
             }
             if (num2 != -1 && num2 < this.BossShoots.Count)
             {
                 this.BossShoots.RemoveAt(num2);
             }
             int num5 = 3 + this.boss.CurrentLevel.ToInt();
             if (num5 > 10)
             {
                 num5 = 10;
             }
             this.boss.Move((float)num5 * this.multi);
             num2 = -1;
             for (int m = 0; m < this.Lasers.Count; m++)
             {
                 AreaGodlyShoot.Element element2 = this.Lasers[m];
                 if (element2 != null)
                 {
                     if (element2.Check(this.Player))
                     {
                         this.EndGame();
                         return;
                     }
                     element2.ShootDown(20f * this.multi);
                     if (element2.marginTop > 800f)
                     {
                         num2 = m;
                     }
                 }
             }
             if (num2 != -1 && num2 < this.Lasers.Count)
             {
                 this.Lasers.RemoveAt(num2);
             }
         }
         if (this.timeCloud > this.newCloudTimer)
         {
             this.newCloudTimer = (long)UnityEngine.Random.Range(800, 2400);
             this.timeCloud     = 0L;
             this.AddCloud(960f);
         }
         for (int n = 0; n < this.AllShots.Count; n++)
         {
             AreaGodlyShoot.Element element3 = this.AllShots[n];
             if (this.boss != null && element3.Check(this.boss) && this.boss.GetHit())
             {
                 this.Points += this.boss.CurrentLevel * 50;
                 this.Points *= 1.2;
                 this.boss.UpgradeLevel();
             }
             for (int num6 = 0; num6 < this.AllBoulders.Count; num6++)
             {
                 if (element3.Check(this.AllBoulders[num6]))
                 {
                     this.AllBoulders.RemoveAt(num6);
                     this.Points = ++this.Points;
                     break;
                 }
             }
             if (GuiBase.Width((float)((int)element3.marginLeft)) > GuiBase.Width(900f))
             {
                 this.AllShots.RemoveAt(n);
                 break;
             }
             element3.Shoot(12f * this.multi);
         }
         if (this.boss != null && this.boss.Check(this.Player))
         {
             this.EndGame();
             return;
         }
         num2 = -1;
         for (int num7 = 0; num7 < this.AllBoulders.Count; num7++)
         {
             AreaGodlyShoot.Element element4 = this.AllBoulders[num7];
             if (element4.Check(this.Player))
             {
                 this.EndGame();
                 return;
             }
             if (element4.marginLeft < -50f)
             {
                 num2 = num7;
             }
             element4.Fall(3f * this.multi);
         }
         if (num2 != -1 && num2 < this.AllBoulders.Count)
         {
             this.AllBoulders.RemoveAt(num2);
         }
         num2 = -1;
         for (int num8 = 0; num8 < this.AllClouds.Count; num8++)
         {
             AreaGodlyShoot.Element element5 = this.AllClouds[num8];
             if (element5.marginLeft < -50f)
             {
                 num2 = num8;
             }
             element5.Move((float)UnityEngine.Random.Range(0, 4));
         }
         if (num2 != -1 && num2 < this.AllClouds.Count)
         {
             this.AllClouds.RemoveAt(num2);
         }
     }
     if (this.marginTop > 500f || this.marginLeft < -20f || this.marginLeft > 890f || this.marginTop < -20f)
     {
         this.EndGame();
     }
 }
        public void Show()
        {
            if (this.Avatar == null || this.Player == null)
            {
                this.ImageBoss      = (Texture2D)Resources.Load("Gui/boss_slimie", typeof(Texture2D));
                this.ImageBossShoot = (Texture2D)Resources.Load("Gui/boss_slimie_shoot", typeof(Texture2D));
                this.ImageShot      = (Texture2D)Resources.Load("Gui/ball", typeof(Texture2D));
                this.ImageBoulder   = (Texture2D)Resources.Load("Gui/stone", typeof(Texture2D));
                this.Background     = (Texture2D)Resources.Load("Gui/bgblue", typeof(Texture2D));
                this.ImageLaser     = (Texture2D)Resources.Load("Gui/blaser", typeof(Texture2D));
                this.Cloud          = (Texture2D)Resources.Load("Gui/cloud", typeof(Texture2D));
                this.Player         = new AreaGodlyShoot.Element(this.Avatar, this.marginLeft, this.marginTop, 100f, 100f);
            }
            if (this.timeMs == 0L)
            {
                this.timeMs = UpdateStats.CurrentTimeMillis();
            }
            GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), this.Background, ScaleMode.StretchToFill, true);
            foreach (AreaGodlyShoot.Element current in this.AllClouds)
            {
                current.Draw();
            }
            this.Player.Update(this.marginLeft, this.marginTop);
            foreach (AreaGodlyShoot.Element current2 in this.AllShots)
            {
                current2.Draw();
            }
            foreach (AreaGodlyShoot.Element current3 in this.AllBoulders)
            {
                current3.Draw();
            }
            if (this.boss != null)
            {
                this.boss.Draw();
                foreach (AreaGodlyShoot.Element current4 in this.BossShoots)
                {
                    current4.Draw();
                }
                foreach (AreaGodlyShoot.Element current5 in this.Lasers)
                {
                    current5.Draw();
                }
            }
            GUI.Box(new Rect(GuiBase.Width(10f), GuiBase.Height(10f), GuiBase.Width(150f), GuiBase.Height(26f)), string.Empty);
            GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height(12f), GuiBase.Width(140f), GuiBase.Height(25f)), "Points: " + this.Points.ToGuiText(true));
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize  = GuiBase.FontSize(24);
            style.fontStyle = FontStyle.Bold;
            GUI.Box(new Rect(GuiBase.Width(390f), GuiBase.Height(10f), GuiBase.Width(165f), GuiBase.Height(40f)), string.Empty);
            GUI.Label(new Rect(GuiBase.Width(400f), GuiBase.Height(13f), GuiBase.Width(160f), GuiBase.Height(40f)), "Godly Shoot");
            style.fontSize  = GuiBase.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            if (!this.isFlying)
            {
                GUI.Box(new Rect(GuiBase.Width(350f), GuiBase.Height(180f), GuiBase.Width(300f), GuiBase.Height(205f)), string.Empty);
                GUI.Label(new Rect(GuiBase.Width(360f), GuiBase.Height(190f), GuiBase.Width(240f), GuiBase.Height(100f)), "Move with wasd or arrows and press space or return to shoot meteorites while dodging them.\nPress 'c' to continue if you die.");
                GUI.Label(new Rect(GuiBase.Width(360f), GuiBase.Height(300f), GuiBase.Width(240f), GuiBase.Height(100f)), "Highscore: " + App.State.Statistic.GodlyShootScore.ToGuiText(true));
                GUI.Label(new Rect(GuiBase.Width(360f), GuiBase.Height(340f), GuiBase.Width(240f), GuiBase.Height(100f)), "Highscore: " + App.State.Statistic.GodlyShootScoreBoss.ToGuiText(true));
                if (GUI.Button(new Rect(GuiBase.Width(510f), GuiBase.Height(300f), GuiBase.Width(130f), GuiBase.Height(30f)), "Start Game"))
                {
                    this.Start(null);
                }
                if (GUI.Button(new Rect(GuiBase.Width(510f), GuiBase.Height(340f), GuiBase.Width(130f), GuiBase.Height(30f)), "Fight Boss"))
                {
                    this.Start(new AreaGodlyShoot.Boss(this.ImageBoss, 600f, 250f, 200f, 200f, 1));
                }
            }
            this.UpdateProgress();
        }