|
@@ -33,12 +33,37 @@ namespace GFGGame
|
|
|
comHolder.target.SetPosition(pos.x, pos.y, 0);
|
|
|
}
|
|
|
|
|
|
- public void AddGMViewEventListener()
|
|
|
+ private static int index = 0;
|
|
|
+ public static void AddShowGMViewEventListener()
|
|
|
{
|
|
|
+ if (LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL)
|
|
|
+ {
|
|
|
+ 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 void ShowGmView()
|
|
|
+ public static void ShowGmView()
|
|
|
{
|
|
|
ViewManager.Show(ViewName.GM_PANEL_VIEW);
|
|
|
}
|