Selaa lähdekoodia

添加跳过功能开启检查GM

zhaoyang 3 vuotta sitten
vanhempi
commit
e00a2fdeba

+ 13 - 10
FGUIProject/assets/Main/components/ComBtn.xml

@@ -1,25 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="500,400" overflow="scroll">
   <displayList>
-    <component id="n11_c5sc" name="btnGetAllDressUpItem" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,0" size="332,46">
+    <component id="n11_c5sc" name="btnGetAllDressUpItem" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,63" size="332,46">
       <Button title="获取所有换装部件" titleFontSize="30"/>
     </component>
-    <component id="n13_c5sc" name="btnGetAllCardItem" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,66" size="330,46">
+    <component id="n13_c5sc" name="btnGetAllCardItem" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,129" size="330,46">
       <Button title="获取所有卡牌" titleFontSize="30"/>
     </component>
-    <component id="n14_lqp0" name="btnSetLv" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,132" size="330,46">
+    <component id="n14_lqp0" name="btnSetLv" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,195" size="330,46">
       <Button title="设置玩家等级" titleFontSize="30"/>
     </component>
-    <text id="n17_lqp0" name="txtRoleLv" xy="332,134" size="119,42" fontSize="30" autoSize="none" text="99" input="true" prompt="[color=#B6A688]99[/color]" maxLength="3"/>
-    <component id="n15_lqp0" name="btnSetChapter" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,198" size="330,46">
+    <text id="n17_lqp0" name="txtRoleLv" xy="332,197" size="119,42" fontSize="30" autoSize="none" text="99" input="true" prompt="[color=#B6A688]99[/color]" maxLength="3"/>
+    <component id="n15_lqp0" name="btnSetChapter" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,261" size="330,46">
       <Button title="设置玩家章节" titleFontSize="30"/>
     </component>
-    <text id="n18_lqp0" name="txtChapter" xy="333,199" size="44,42" fontSize="30" autoSize="none" text="5" input="true" prompt="[color=#B6A688]章[/color]"/>
-    <text id="n19_lqp0" name="txtChapterLv" xy="411,199" size="42,42" fontSize="30" autoSize="none" text="1" input="true" prompt="[color=#B6A688]关[/color]"/>
-    <component id="n20_lqp0" name="btnAll" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,267" size="330,46">
+    <text id="n18_lqp0" name="txtChapter" xy="333,262" size="44,42" fontSize="30" autoSize="none" text="5" input="true" prompt="[color=#B6A688]章[/color]"/>
+    <text id="n19_lqp0" name="txtChapterLv" xy="411,262" size="42,42" fontSize="30" autoSize="none" text="1" input="true" prompt="[color=#B6A688]关[/color]"/>
+    <component id="n20_lqp0" name="btnAll" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,0" size="330,46">
       <Button title="666账号" titleFontSize="30"/>
     </component>
-    <text id="n21_lqp0" name="n21" xy="377,199" size="34,42" fontSize="30" text="章"/>
-    <text id="n24_lqp0" name="n24" xy="454,200" size="34,42" fontSize="30" text="关"/>
+    <text id="n21_lqp0" name="n21" xy="377,262" size="34,41" fontSize="30" text="章"/>
+    <text id="n24_lqp0" name="n24" xy="454,263" size="34,41" fontSize="30" text="关"/>
+    <component id="n25_irk8" name="btnSkipCheckOpen" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,325" size="330,46">
+      <Button title="跳过功能开启检测" titleFontSize="30"/>
+    </component>
   </displayList>
 </component>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstStorageId.cs

@@ -7,6 +7,7 @@ namespace GFGGame
         public const int STORAGE_SKIP_GUIDE = 20000;//跳过引导,0不跳过,1跳过
         public const int STORAGE_AUTO_PLAY = 20001;//自动战斗,0不自动战斗,1自动战斗
         public const int STORAGE_AUTO_PLAY_SPEED = 20002;//战斗速度
+        public const int SKIP_CHECK_OPEN = 20003;//跳过检查功能开启0不跳过,1跳过
 
     }
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -191,6 +191,7 @@ namespace GFGGame
 
             EquipDataCache.cacher.autoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY) <= 0 ? false : true;
             EquipDataCache.cacher.fightSpeed = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY_SPEED) <= 1 ? 1 : StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY_SPEED);
+            GameGlobal.skipCheckOpen = StorageDataManager.Instance.GetStorageValue(ConstStorageId.SKIP_CHECK_OPEN) <= 0 ? false : true;
 
         }
 

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComBtn.cs

@@ -15,6 +15,7 @@ namespace UI.Main
         public GTextInput m_txtChapter;
         public GTextInput m_txtChapterLv;
         public GButton m_btnAll;
+        public GButton m_btnSkipCheckOpen;
         public const string URL = "ui://mfvz4q8klqp0dm";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ComBtn";
@@ -70,6 +71,7 @@ namespace UI.Main
             m_txtChapter = (GTextInput)comp.GetChild("txtChapter");
             m_txtChapterLv = (GTextInput)comp.GetChild("txtChapterLv");
             m_btnAll = (GButton)comp.GetChild("btnAll");
+            m_btnSkipCheckOpen = (GButton)comp.GetChild("btnSkipCheckOpen");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -81,6 +83,7 @@ namespace UI.Main
             m_txtChapter = null;
             m_txtChapterLv = null;
             m_btnAll = null;
+            m_btnSkipCheckOpen = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 2 - 0
GameClient/Assets/Game/HotUpdate/GameGlobal.cs

@@ -18,6 +18,8 @@ namespace GFGGame
 
         public static bool skipGuide;
 
+        public static bool skipCheckOpen;//跳过功能开启检查
+
         public static string loginApiUrl;
         public static string gameApiUrl;
         public static string gameApiUrlTest;

+ 14 - 0
GameClient/Assets/Game/HotUpdate/Views/MainUI/GMPanelView.cs

@@ -34,6 +34,7 @@ namespace GFGGame
             _ui.m_ComBtn.m_btnAll.onClick.Add(OnClickBtnAll);
             _ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
             _ui.m_btnGM.onClick.Add(OnClickBtnGM);
+            _ui.m_ComBtn.m_btnSkipCheckOpen.onClick.Add(OnClickBtnSkipCheckOpen);
         }
 
         protected override void OnShown()
@@ -104,7 +105,19 @@ namespace GFGGame
             string messageSuc = string.Format("当前关卡第{0}章第{1}关", _ui.m_ComBtn.m_txtChapter.text, _ui.m_ComBtn.m_txtChapterLv.text);
             GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
         }
+        private async void OnClickBtnSkipCheckOpen()
+        {
+            int isSkip = GameGlobal.skipCheckOpen == false ? 1 : 0;
+            bool result = await StorageSProxy.ReqSetClientValue(ConstStorageId.SKIP_CHECK_OPEN, isSkip);
+            if (result)
+            {
+                GameGlobal.skipCheckOpen = !GameGlobal.skipCheckOpen;
+                PromptController.Instance.ShowFloatTextPrompt("已开启跳过功能开启检测");
+
+            }
+
 
+        }
         private void OnClickBtnAll()
         {
             OnClickBtnGetAllDressUpItem();
@@ -114,6 +127,7 @@ namespace GFGGame
             _ui.m_ComBtn.m_txtChapter.text = "5";
             _ui.m_ComBtn.m_txtChapterLv.text = "1";
             OnClickBtnSetChapter();
+            OnClickBtnSkipCheckOpen();
         }
 
         private void OnClickBtnGM(EventContext context)

+ 8 - 8
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -52,10 +52,10 @@ namespace GFGGame
         public static void Show(string viewName, object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false)
         {
             string name = GetName(viewName);
-            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
-            // {
-            //     return;
-            // }
+            if (!GameGlobal.skipCheckOpen && !FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
+            {
+                return;
+            }
             if (hideOthers)
             {
                 HideAllView(name);
@@ -122,10 +122,10 @@ namespace GFGGame
             // string viewName = names[names.Length - 1];
             string name = GetName(typeof(T).FullName);
 
-            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
-            // {
-            //     return false;
-            // }
+            if (!GameGlobal.skipCheckOpen && !FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
+            {
+                return false;
+            }
             if (hideOthers)
             {
                 HideAllView(name);

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes