Ejemplo n.º 1
0
        /// <summary>
        /// 登陆前是客户端时间,登陆后是同步过的服务器时间
        /// </summary>
        /// <returns></returns>
        public static long Now()
        {
            TimeComponent gameTimeComponent = Game.Scene?.GetComponent <TimeComponent>();

            if (gameTimeComponent == null)
            {
                return(TimeHelper.ClientNow());
            }
            long t = gameTimeComponent.Now();

            return(t);
        }
Ejemplo n.º 2
0
 public void Awake(TimeComponent p1)
 {
     this.GetValue().TimeComponent = p1;
 }