Esempio n. 1
0
 private void ResetGame()
 {
     GuiBase.ShowDialog("Everything will be resetted to the base values.", "Do you really want to reset the game?", delegate
     {
         if (App.CurrentPlattform == Plattform.Kongregate)
         {
             MainUi.ExportToClipboard();
             MainUi.ResetGame();
             GuiBase.ShowToast("Game resetted and your gamestate is saved to the clipboard in case you still want to keep it somewhere.");
         }
         else if (App.CurrentPlattform == Plattform.Steam)
         {
             string text = "SaveBeforeReset";
             string str  = Application.dataPath + "\\" + text;
             Storage.SaveGameState(App.State, text);
             MainUi.ResetGame();
             GuiBase.ShowToast("Game resetted and your game is saved to " + str + " in case you still want to keep it somewhere.");
         }
         else
         {
             MainUi.ResetGame();
         }
     }, delegate
     {
     }, "Yes", "No", false, false);
 }
Esempio n. 2
0
 private static int AddItem(string text, string dialogText, int marginTop, int cost, GUIStyle labelStyle, Action result)
 {
     GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)marginTop), GuiBase.Width(390f), GuiBase.Height(130f)), text);
     GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height((float)marginTop), GuiBase.Width(32f), GuiBase.Height(32f)), GodPowerUi.godPower);
     if (GUI.Button(new Rect(GuiBase.Width(420f), GuiBase.Height((float)marginTop), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Get it for " + cost)))
     {
         GuiBase.ShowDialog("Are you sure?", string.Concat(new object[]
         {
             "This will use up ",
             cost,
             " god power and ",
             dialogText
         }), delegate
         {
             if (GodPowerUi.SpendGodPower(cost))
             {
                 result();
                 App.SaveGameState();
             }
         }, delegate
         {
         }, "Yes", "No", false, false);
     }
     return(marginTop + 30);
 }
Esempio n. 3
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);
     }
 }
Esempio n. 4
0
 private void Load()
 {
     GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
     {
         CDouble count       = App.State.Clones.Count;
         GameState gameState = Storage.LoadGameState("ManualSave.txt");
         if (gameState != null)
         {
             App.State = gameState;
             this.InitAfterLoad();
         }
         else
         {
             App.State.Clones.Count = count;
         }
     }, delegate
     {
     }, "Yes", "No", false, false);
 }
Esempio n. 5
0
 private void Import(bool editorImport)
 {
     GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
     {
         TextEditor textEditor = new TextEditor();
         textEditor.Paste();
         string text  = textEditor.text;
         string text2 = "The pasted save is broken. Please try again. Copy an previous exported save to your clipboard first. It also probably won't work if you try to manipulate the save.";
         try
         {
             CDouble count       = App.State.Clones.Count;
             GameState gameState = Storage.FromCompressedString(text);
             gameState.InitAchievementNames();
             if (!string.IsNullOrEmpty(gameState.KongUserId) && !string.IsNullOrEmpty(App.State.KongUserId) && !gameState.KongUserId.Equals(App.State.KongUserId) && !editorImport)
             {
                 GuiBase.ShowToast("This save is from: " + gameState.KongUserName + ". You are not allowed to use a save from a different user!");
                 App.State.Clones.Count = count;
             }
             else if (gameState != null && gameState.Clones.Count > 0)
             {
                 App.State = gameState;
                 this.InitAfterLoad();
             }
             else
             {
                 GuiBase.ShowToast(text2);
                 App.State.Clones.Count = count;
             }
         }
         catch (Exception)
         {
             GuiBase.ShowToast(text2);
         }
     }, delegate
     {
     }, "Yes", "No", false, false);
 }
        public void Show(GUIStyle labelStyle)
        {
            labelStyle.alignment = TextAnchor.UpperCenter;
            GUIStyle style = GUI.skin.GetStyle("Button");

            style.fontSize = GuiBase.FontSize(14);
            GUI.BeginGroup(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height));
            GUI.Box(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), string.Empty);
            GUI.Label(new Rect(GuiBase.Width(300f), GuiBase.Height(20f), GuiBase.Width(400f), GuiBase.Height(40f)), GuiBase.Logo);
            this.ShowAfk = GUI.Toggle(new Rect(GuiBase.Width(780f), GuiBase.Height(20f), GuiBase.Width(80f), GuiBase.Height(30f)), this.ShowAfk, new GUIContent("AFK", "Click to go on afk mode. Progress will be 100% but the cpu usage is lower."));
            GUI.Label(new Rect(GuiBase.Width(250f), GuiBase.Height(80f), GuiBase.Width(500f), GuiBase.Height(250f)), "Afk Mode is on. While this is on, you can't do anything but watching this beautiful screen. The game also progresses fully and uses less cpu.\n");
            GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height(180f), GuiBase.Width(500f), GuiBase.Height(25f)), new GUIContent("Your Power level: " + App.State.PowerLevel.ToGuiText(true), "Your total power, including Physical, Mystic, Battle and Creating.\nIt's an indicator of how strong you are compared to other gods. But whether you can defeat one depends on your individual values."));
            int num  = 50;
            int num2 = 220;

            this.ShowAfkyGod = GUI.Toggle(new Rect(GuiBase.Width(400f), GuiBase.Height((float)num2), GuiBase.Width(120f), GuiBase.Height(30f)), this.ShowAfkyGod, new GUIContent("Show Afky God", "This is just a minigame and has not much to do with the rest of the game."));
            if (this.ShowAfkyGod)
            {
                AfkyGame game = App.State.Ext.AfkGame;
                num2 += 30;
                labelStyle.alignment = TextAnchor.UpperLeft;
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), "Firing Speed");
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.FiringSpeed.Level.GuiText);
                if (game.FiringSpeed.Level >= 3800)
                {
                    game.FiringSpeed.Level = 3800;
                    GUI.Label(new Rect(GuiBase.Width((float)(num + 250)), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), "Maxed");
                }
                else
                {
                    this.AddLvUpButtons(game, num + 250, num2, ref game.FiringSpeed, null);
                }
                num2 += 25;
                string tooltip = string.Empty;
                if (game.Power.Level > 1000000)
                {
                    tooltip = string.Empty + game.Power.Level;
                }
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), new GUIContent("Power", tooltip));
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.Power.Level.GuiText);
                this.AddLvUpButtons(game, num + 250, num2, ref game.Power, null);
                num2 += 25;
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), "Clone Hp");
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.CloneHp.Level.GuiText);
                this.AddLvUpButtons(game, num + 250, num2, ref game.CloneHp, delegate
                {
                    GuiBase.ShowDialog("Max", "Do you really want to spend all your exp on clone hp?", delegate
                    {
                        game.Exp -= game.CloneHp.LevelUp(game.Exp, 0, true);
                        this.CheckHighestPower(game);
                    }, delegate
                    {
                    }, "Yes", "No", false, false);
                });
                num2 += 25;
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), "Clone Count");
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.CloneCount.Level.GuiText);
                this.AddLvUpButtons(game, num + 250, num2, ref game.CloneCount, delegate
                {
                    GuiBase.ShowDialog("Max", "Do you really want to spend all your exp on clone count?", delegate
                    {
                        game.Exp -= game.CloneCount.LevelUp(game.Exp, 0, true);
                        this.CheckHighestPower(game);
                    }, delegate
                    {
                    }, "Yes", "No", false, false);
                });
                num2 += 25;
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), new GUIContent("Experience", "Exp multiplier = " + App.State.Ext.AfkGame.ExpMulti.ToGuiText(false)));
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.Exp.GuiText);
                int num3 = this.toolbarInt;
                if (UpdateStats.TimeLeftForEvent < 0L)
                {
                    this.toolbarInt = GUI.Toolbar(new Rect(GuiBase.Width((float)(num + 250)), GuiBase.Height((float)(num2 + 2)), GuiBase.Width(275f), GuiBase.Height(25f)), this.toolbarInt, this.toolbarStrings);
                }
                bool flag = this.afkyman == null || this.toolbarInt != num3;
                num2 = 300;
                num  = 590;
                GUI.Label(new Rect(GuiBase.Width((float)num), GuiBase.Height((float)num2), GuiBase.Width(100f), GuiBase.Height(40f)), "Clones Killed");
                GUI.Label(new Rect(GuiBase.Width((float)(num + 120)), GuiBase.Height((float)num2), GuiBase.Width(400f), GuiBase.Height(40f)), game.KilledClones.GuiText);
                num2 += 75;
                if (flag)
                {
                    if (this.toolbarInt == 0)
                    {
                        this.afkyman      = (Texture2D)Resources.Load("Gui/afkyman", typeof(Texture2D));
                        this.afkymanShoot = (Texture2D)Resources.Load("Gui/afkymanshoot", typeof(Texture2D));
                        this.auraballInit = (Texture2D)Resources.Load("Gui/auraball_init", typeof(Texture2D));
                        this.clone        = (Texture2D)Resources.Load("Gui/afky_clone", typeof(Texture2D));
                        this.cloneDead    = (Texture2D)Resources.Load("Gui/afky_clone_dead", typeof(Texture2D));
                        this.auraball     = (Texture2D)Resources.Load("Gui/auraball", typeof(Texture2D));
                    }
                    else if (this.toolbarInt == 1)
                    {
                        this.afkyman      = (Texture2D)Resources.Load("Gui/afkyman_c", typeof(Texture2D));
                        this.afkymanShoot = (Texture2D)Resources.Load("Gui/afkymanshoot_c", typeof(Texture2D));
                        this.auraballInit = (Texture2D)Resources.Load("Gui/auraball_c", typeof(Texture2D));
                        this.clone        = (Texture2D)Resources.Load("Gui/afky_clone_c", typeof(Texture2D));
                        this.cloneDead    = (Texture2D)Resources.Load("Gui/afky_clone_dead_c", typeof(Texture2D));
                        this.auraball     = (Texture2D)Resources.Load("Gui/auraball_c", typeof(Texture2D));
                    }
                    else if (this.toolbarInt == 2)
                    {
                        this.afkyman      = (Texture2D)Resources.Load("Gui/afkyman", typeof(Texture2D));
                        this.afkymanShoot = (Texture2D)Resources.Load("Gui/afkymanshoot", typeof(Texture2D));
                        this.auraballInit = (Texture2D)Resources.Load("Gui/auraball_init_v", typeof(Texture2D));
                        this.clone        = (Texture2D)Resources.Load("Gui/afky_clone", typeof(Texture2D));
                        this.cloneDead    = (Texture2D)Resources.Load("Gui/afky_clone_dead", typeof(Texture2D));
                        this.auraball     = (Texture2D)Resources.Load("Gui/auraball_v", typeof(Texture2D));
                    }
                }
                if (UpdateStats.TimeLeftForEvent > 0L && !AfkUi.EventInited)
                {
                    AfkUi.EventInited = true;
                    this.afkyman      = (Texture2D)Resources.Load("Gui/afkyman", typeof(Texture2D));
                    this.afkymanShoot = (Texture2D)Resources.Load("Gui/afkymanshoot", typeof(Texture2D));
                    this.auraballInit = (Texture2D)Resources.Load("Gui/auraball_init_v", typeof(Texture2D));
                    this.clone        = (Texture2D)Resources.Load("Gui/afky_clone", typeof(Texture2D));
                    this.cloneDead    = (Texture2D)Resources.Load("Gui/afky_clone_dead", typeof(Texture2D));
                    this.auraball     = (Texture2D)Resources.Load("Gui/auraball_v", typeof(Texture2D));
                }
                if (game.FiringPhase)
                {
                    GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height((float)num2), GuiBase.Width(200f), GuiBase.Height(200f)), this.afkymanShoot);
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height((float)num2), GuiBase.Width(200f), GuiBase.Height(200f)), this.afkyman);
                    GUI.Label(new Rect(GuiBase.Width(260f), GuiBase.Height((float)(num2 + 40)), GuiBase.Width(80f), GuiBase.Height(80f)), this.auraballInit);
                }
                for (int i = game.AuraballPositions.Count - 1; i >= 0; i--)
                {
                    GUI.Label(new Rect(GuiBase.Width(game.AuraballPositions[i].Pos), GuiBase.Height(410f), GuiBase.Width(80f), GuiBase.Height(80f)), this.auraball);
                }
                int num4 = game.CloneCount.Level.ToInt();
                if (num4 > 10)
                {
                    num4 = 10;
                }
                for (int j = 0; j < num4; j++)
                {
                    if (game.deadCloneTimer > 0f && j < game.ShootKillCount && game.ShootKillCount > 0)
                    {
                        GUI.Label(new Rect(GuiBase.Width((float)(game.PosFirstClone + j * 25)), GuiBase.Height((float)num2), GuiBase.Width(200f), GuiBase.Height(200f)), this.cloneDead);
                    }
                    else
                    {
                        GUI.Label(new Rect(GuiBase.Width((float)(game.PosFirstClone + j * 25)), GuiBase.Height((float)num2), GuiBase.Width(200f), GuiBase.Height(200f)), this.clone);
                    }
                }
                if (game.deadCloneTimer > 0f)
                {
                    GUI.Label(new Rect(GuiBase.Width(710f), GuiBase.Height(320f), GuiBase.Width(310f), GuiBase.Height(200f)), " + " + game.ShootKillCount.GuiText);
                    GUI.Label(new Rect(GuiBase.Width(170f), GuiBase.Height(375f), GuiBase.Width(200f), GuiBase.Height(200f)), " + " + game.CloneExpTotal.ToGuiText(false));
                }
            }
            GUI.EndGroup();
        }
Esempio n. 7
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();
        }
Esempio n. 8
0
        protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
        {
            this.SyncScrollbars  = false;
            labelStyle.alignment = TextAnchor.MiddleLeft;
            labelStyle.fontStyle = FontStyle.Normal;
            labelStyle.fontSize  = GuiBase.FontSize(16);
            marginTop           += 5;
            string text = "Info";

            if (this.isFighting || this.showBaalPower || this.showInfo)
            {
                text = "Back";
            }
            if (GUI.Button(new Rect(GuiBase.Width(560f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), text))
            {
                if (this.isFighting)
                {
                    this.isFighting = false;
                }
                else if (this.showBaalPower)
                {
                    this.showBaalPower = false;
                }
                else
                {
                    this.showInfo = !this.showInfo;
                }
            }
            bool flag = App.State.Statistic.UltimateBaalChallengesFinished > 0 || (!this.showInfo && App.State.Statistic.ArtyChallengesFinished > 0);

            if (!App.State.HomePlanet.IsCreated)
            {
                flag = false;
            }
            if (App.State.HomePlanet.IsCreated)
            {
                if (App.State.Statistic.ArtyChallengesFinished > 0 || App.State.Statistic.UltimateBaalChallengesFinished > 0)
                {
                    PlanetUi.ToolbarIntPlanet = GUI.Toolbar(new Rect(GuiBase.Width(320f), GuiBase.Height(45f), GuiBase.Width(330f), GuiBase.Height(25f)), PlanetUi.ToolbarIntPlanet, this.toolbarStringsPlanet);
                    this.showV2 = (PlanetUi.ToolbarIntPlanet == 1 && flag);
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(450f), GuiBase.Height(45f), GuiBase.Width(100f), GuiBase.Height(25f)), new GUIContent("???", "Finish at least one UBC or UAC to unlock"));
                }
            }
            if (!this.showInfo && !this.isFighting && !this.showBaalPower)
            {
                if (App.State.HomePlanet.UpgradeLevel < 5 || !App.State.HomePlanet.IsCreated)
                {
                    string buttonText = "Unlock";
                    if (App.State.HomePlanet.IsCreated)
                    {
                        buttonText = "Upgrade";
                    }
                    if (GUI.Button(new Rect(GuiBase.Width(320f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), buttonText))
                    {
                        int creationTier = 24 + App.State.HomePlanet.UpgradeLevel.ToInt();
                        if (!App.State.HomePlanet.IsCreated)
                        {
                            creationTier = 23;
                        }
                        Creation creationNeeded = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == (Creation.CreationType)creationTier);
                        if (creationNeeded == null || creationNeeded.Count == 0)
                        {
                            if (!App.State.HomePlanet.IsCreated)
                            {
                                GuiBase.ShowToast("You need to defeat Jupiter and create one Planet to unlock your home planet.");
                            }
                            else
                            {
                                GuiBase.ShowToast(string.Concat(new string[]
                                {
                                    "You need 1 ",
                                    creationNeeded.Name,
                                    " to ",
                                    buttonText,
                                    " your Planet!"
                                }));
                            }
                        }
                        else
                        {
                            GuiBase.ShowDialog(buttonText + " Planet", string.Concat(new string[]
                            {
                                "Do you want to ",
                                buttonText.ToLower(),
                                " your Planet and use up 1 ",
                                creationNeeded.Name,
                                "?"
                            }), delegate
                            {
                                App.State.HomePlanet.Upgrade(App.State);
                                creationNeeded.Count -= 1;
                                GuiBase.ShowToast("You successfully " + buttonText + "d your Planet by spending 1 " + creationNeeded.Name);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }
                }
                if (App.State.HomePlanet.IsCreated)
                {
                    labelStyle.fontStyle = FontStyle.Bold;
                    labelStyle.fontSize  = GuiBase.FontSize(18);
                    string text2 = string.Concat(new object[]
                    {
                        App.State.HomePlanet.Name,
                        " (level ",
                        App.State.HomePlanet.UpgradeLevel,
                        ")"
                    });
                    if (App.State.HomePlanet.UpgradeLevel == 50)
                    {
                        text2 = string.Concat(new object[]
                        {
                            App.State.HomePlanet.Name,
                            " (level ",
                            App.State.HomePlanet.UpgradeLevel,
                            " MAX)"
                        });
                    }
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(500f), GuiBase.Height(30f)), text2, labelStyle);
                    labelStyle.alignment = TextAnchor.UpperCenter;
                    GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Ultimate Being");
                    if (!this.showV2)
                    {
                        GUI.Label(new Rect(GuiBase.Width(175f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Revert time");
                        GUI.Label(new Rect(GuiBase.Width(355f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(200f), GuiBase.Height(30f)), "Multiplier increase", labelStyle);
                    }
                    else
                    {
                        GUI.Label(new Rect(GuiBase.Width(175f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Count");
                        GUI.Label(new Rect(GuiBase.Width(330f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(100f), GuiBase.Height(30f)), "Stop At");
                    }
                }
            }
            labelStyle.fontSize = GuiBase.FontSize(16);
        }