Beispiel #1
0
 public void Reset()
 {
     this.selectedBeing = null;
     this.showBaalPower = false;
     this.showInfo      = false;
     this.isFighting    = false;
     this.fightLog      = string.Empty;
     this.showV2        = false;
     this.Battle        = null;
 }
Beispiel #2
0
 private void showUBV2s(int marginTop, GUIStyle labelStyle)
 {
     using (List <UltimateBeingV2> .Enumerator enumerator = App.State.HomePlanet.UltimateBeingsV2.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             UltimateBeingV2 being = enumerator.Current;
             if (!being.IsDefeated)
             {
                 labelStyle.fontSize = GuiBase.FontSize(16);
                 if (being.IsAvailable)
                 {
                     string text = being.Description;
                     if (being.HPPercent < 100)
                     {
                         text = text + "\nHp left: " + being.HPPercent.ToGuiText(true) + " %";
                     }
                     GuiBase.CreateProgressBar(marginTop, being.HPPercent.Double / 100.0, being.Name, text, GuiBase.progressBg, GuiBase.progressFgRed);
                     if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Fight", string.Concat(new object[]
                     {
                         "If you win, you will receive ",
                         being.Tier * 10,
                         " God Power and your Multi from Ultimate Beings will increase by ",
                         being.GetMultiplier(App.State.HomePlanet.UBMultiplier).ToGuiText(true),
                         " %"
                     }))))
                     {
                         if (App.State.CurrentHealth * 2 < App.State.MaxHealth || App.State.HomePlanet.ShadowCloneCount < 100000)
                         {
                             GuiBase.ShowToast("Your need at least 50% of your health and 100000 Clones on Powersurge to be able to start a fight.");
                         }
                         else
                         {
                             this.Battle = BattleUBV2.Instance;
                             this.Battle.start(being);
                         }
                     }
                     marginTop += 35;
                     Creation creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == being.CreationNeeded);
                     string   str      = string.Empty;
                     if (creation != null)
                     {
                         str = "\n\nYou have " + creation.Count.GuiText + " x " + creation.Name;
                     }
                     GuiBase.CreateProgressBar(marginTop, being.CurrentCreationDuration.Double / being.CreationDuration.Double, being.CreationName, being.CreationDescription + str, GuiBase.progressBg, GuiBase.progressFgBlue);
                     being.StopAtString = GUI.TextField(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), being.StopAtString);
                     if (!being.isCreating)
                     {
                         if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Create", "If you create a " + being.CreationName + ", you can't create anything else until you stop it.")))
                         {
                             being.isCreating = true;
                             being.InitDuration(App.State);
                             foreach (Creation current in App.State.AllCreations)
                             {
                                 current.IsActive = false;
                             }
                         }
                     }
                     else if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Stop"))
                     {
                         being.isCreating = false;
                         being.GoBackToCreating();
                     }
                     GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), string.Empty + being.CreationCount.ToGuiText(true), labelStyle);
                 }
                 marginTop += 35;
             }
         }
     }
     labelStyle.alignment = TextAnchor.UpperLeft;
     GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height((float)(marginTop - 5)), GuiBase.Width(200f), GuiBase.Height(30f)), (App.State.HomePlanet.PlanetMultiplier + 100).ToGuiText(true) + " %", labelStyle);
     labelStyle.fontStyle = FontStyle.Bold;
     labelStyle.fontSize  = GuiBase.FontSize(18);
     GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)(marginTop - 5)), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Planet Multiplier", string.Concat(new string[]
     {
         "This multiplier multiplies directly Physical, Mystic, Battle and Creating. 100% is the base value.lowerTextMulti from Powersurge: ",
         App.State.HomePlanet.PowerSurgeMultiplier.ToGuiText(true),
         " %\nMulti from Ultimate Beings: ",
         App.State.HomePlanet.UBMultiplier.ToGuiText(true),
         " %"
     })), labelStyle);
     labelStyle.fontStyle = FontStyle.Normal;
 }