少年修仙传客户端代码仓库
UI/Common/TimerBehaviour.cs
@@ -22,11 +22,11 @@
        float secondTimer = 0f;
        public void Begin(DateTime _endTime, Action _callBack = null)
        public void Begin(int seconds, Action _callBack = null)
        {
            endTime = _endTime;
            endTime = TimeUtility.ServerNow + new TimeSpan(seconds * TimeSpan.TicksPerSecond);
            onTime = _callBack;
            if (endTime > DateTime.Now)
            if (endTime > TimeUtility.ServerNow)
            {
                this.gameObject.SetActive(true);
                UpdateTimeShow();
@@ -46,7 +46,7 @@
        private void LateUpdate()
        {
            if (DateTime.Now > endTime)
            if (TimeUtility.ServerNow > endTime)
            {
                if (onTime != null)
                {
@@ -69,7 +69,7 @@
        protected virtual void UpdateTimeShow()
        {
            var lastSecond = (float)(endTime - DateTime.Now).TotalSeconds;
            var lastSecond = (float)(endTime - TimeUtility.ServerNow).TotalSeconds;
            switch (m_Pattern)
            {