|
@@ -1,5 +1,6 @@
|
|
using System;
|
|
using System;
|
|
using ET;
|
|
using ET;
|
|
|
|
+using FairyGUI;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
@@ -45,5 +46,46 @@ namespace GFGGame
|
|
PromptController.Instance.ShowFloatTextPrompt(messageSuc, MessageType.SUCCESS);
|
|
PromptController.Instance.ShowFloatTextPrompt(messageSuc, MessageType.SUCCESS);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private static int index = 0;
|
|
|
|
+ public static void AddShowGMViewEventListener()
|
|
|
|
+ {
|
|
|
|
+ GRoot.inst.onTouchBegin.Add(OnTouchBegin);
|
|
|
|
+ }
|
|
|
|
+ private static void OnTouchBegin(EventContext context)
|
|
|
|
+ {
|
|
|
|
+ if (context.inputEvent.button == 1 || Stage.inst.touchCount == 2)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ if (index == 0)
|
|
|
|
+ {
|
|
|
|
+ Timers.inst.Add(1, 1, OnTimeComplete);
|
|
|
|
+ }
|
|
|
|
+ index++;
|
|
|
|
+ if (index == 2)
|
|
|
|
+ {
|
|
|
|
+ ShowGmView();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ private static void OnTimeComplete(object param)
|
|
|
|
+ {
|
|
|
|
+ index = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static void ShowGmView()
|
|
|
|
+ {
|
|
|
|
+ if (ViewManager.isViewOpen(typeof(PhotographView).FullName)) return;
|
|
|
|
+ if (GameConfig.showGM >= 1)
|
|
|
|
+ {
|
|
|
|
+ ViewManager.Show(ViewName.GM_PANEL_VIEW);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ViewManager.Show(ViewName.LOG_VIEW);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|