示例#1
0
 public static void IntializeDriver()
 {
     if (null == driver)
     {
         driver = TimerDriver.Initialize();
     }
 }
示例#2
0
 /// <summary>
 /// 初始化计时器驱动
 /// </summary>
 /// <returns>驱动的实例</returns>
 public static TimerDriver Initialize()
 {
     if (!Application.isPlaying)
     {
         return(null);
     }
     if (!hasInit)
     {
         hasInit   = true;
         _instance = new GameObject("TimerEntity").AddComponent <TimerDriver>();
         //_instance.gameObject.hideFlags = HideFlags.HideAndDontSave;
     }
     return(_instance);
 }
示例#3
0
 private void Awake()
 {
     _instance = this;
     hasInit   = true;
 }