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);
     }
 }
        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();
        }
示例#6
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();
        }