|
@@ -6,6 +6,7 @@ using ET;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using Assets.Game.HotUpdate.Data;
|
|
using Assets.Game.HotUpdate.Data;
|
|
using System.Collections;
|
|
using System.Collections;
|
|
|
|
+using System;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
@@ -17,6 +18,8 @@ namespace GFGGame
|
|
private SwipeGesture swipeGesture;
|
|
private SwipeGesture swipeGesture;
|
|
private const int swipeDistance = 100;
|
|
private const int swipeDistance = 100;
|
|
private bool isOpen = false;
|
|
private bool isOpen = false;
|
|
|
|
+ DateTime dateTime;
|
|
|
|
+ DateTime unixStartTime;
|
|
|
|
|
|
|
|
|
|
private List<AdCfg> _adIds = new List<AdCfg>();
|
|
private List<AdCfg> _adIds = new List<AdCfg>();
|
|
@@ -140,6 +143,8 @@ namespace GFGGame
|
|
_ui.m_btnChange.target.selected = true;
|
|
_ui.m_btnChange.target.selected = true;
|
|
|
|
|
|
firstIn = true;
|
|
firstIn = true;
|
|
|
|
+ //这个是东8时区的0时间戳
|
|
|
|
+ unixStartTime = new DateTime(1970, 1, 1, 8, 0, 0);
|
|
}
|
|
}
|
|
|
|
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
@@ -214,6 +219,16 @@ namespace GFGGame
|
|
}
|
|
}
|
|
|
|
|
|
//StorageSProxy.ReqSetClientValue(1012, 4).Coroutine();
|
|
//StorageSProxy.ReqSetClientValue(1012, 4).Coroutine();
|
|
|
|
+ // 临时设置内网显示时间
|
|
|
|
+ if (LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_serverTime.visible = true;
|
|
|
|
+ Timers.inst.AddUpdate(ServerTimeUpdate);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _ui.m_serverTime.visible = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -229,6 +244,7 @@ namespace GFGGame
|
|
Timers.inst.Remove(CheckGuide);
|
|
Timers.inst.Remove(CheckGuide);
|
|
Timers.inst.Remove(UpdateAdListTime);
|
|
Timers.inst.Remove(UpdateAdListTime);
|
|
Timers.inst.Remove(OnShowLater);
|
|
Timers.inst.Remove(OnShowLater);
|
|
|
|
+ Timers.inst.Remove(ServerTimeUpdate);
|
|
}
|
|
}
|
|
|
|
|
|
private void OnShowLater(object param)
|
|
private void OnShowLater(object param)
|
|
@@ -1071,5 +1087,11 @@ namespace GFGGame
|
|
AutoShowCompleted = true;
|
|
AutoShowCompleted = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void ServerTimeUpdate(object param = null)
|
|
|
|
+ {
|
|
|
|
+ dateTime = unixStartTime.AddMilliseconds(TimeHelper.ServerNow());
|
|
|
|
+ _ui.m_serverTime.text = string.Format("服务器时间:{0}", dateTime);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|