Quellcode durchsuchen

GM界面开关处理

guodong vor 1 Jahr
Ursprung
Commit
bfc5099975

+ 7 - 2
GameClient/Assets/Game/HotUpdate/Controller/GMController.cs

@@ -51,13 +51,15 @@ namespace GFGGame
         private static int index = 0;
         public static void AddShowGMViewEventListener()
         {
-            GRoot.inst.onTouchBegin.Add(OnTouchBegin);
+            if (GameConfig.showGM >= 1)
+                GRoot.inst.onTouchBegin.Add(OnTouchBegin);
         }
         private static void OnTouchBegin(EventContext context)
         {
+            //LogUtil.LogDev($"OnTouchBegin 1 {context.inputEvent.button} {Stage.inst.touchCount}");
             if (context.inputEvent.button == 1 || Stage.inst.touchCount == 2)
             {
-
+                //LogUtil.LogDev("OnTouchBegin 2");
                 if (index == 0)
                 {
                     Timers.inst.Add(1, 1, OnTimeComplete);
@@ -73,11 +75,14 @@ namespace GFGGame
         private static void OnTimeComplete(object param)
         {
             index = 0;
+            //LogUtil.LogDev("OnTimeComplete");
         }
 
         public static void ShowGmView()
         {
+            //LogUtil.LogDev("ShowGmView");
             if (ViewManager.isViewOpen(typeof(PhotographView).FullName)) return;
+            if (ViewManager.isViewOpen(typeof(StoryDialogView).FullName)) return;
             if (GameConfig.showGM >= 1)
             {
                 ViewManager.Show<GMPanelView>();

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

@@ -29,7 +29,6 @@ namespace GFGGame
             SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
             //全局点击效果
             ViewGlobal.CreatClickEffect();
-            GMController.AddShowGMViewEventListener();
             //获取游戏配置
             GetGameCfg();
         }
@@ -198,6 +197,7 @@ namespace GFGGame
                         ViewManager.Show<StoryChapterView>(MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(typeof(StoryChapterListView).FullName), true);
                     }
                 }
+                GMController.AddShowGMViewEventListener();
             });
         }
 

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -1281,6 +1281,7 @@ namespace GFGGame
             // _comFosterBottom.m_listLvConsume.numItems = 0;
             _valueBarController.OnHide();
             _cardStarRewards.Clear();
+            Input.multiTouchEnabled = true;
         }
         protected override void RemoveEventListener()
         {