void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
示例#2
0
 public static RTClient GetInstance()
 {
     if (instance == null)
     {
         instance = new RTClient();
     }
     RTClientUpdater.AssertExistence();
     return(instance);
 }
 void OnDestroy()
 {
     if (instance != this)
     {
         return;
     }
     RTClient.GetInstance().Dispose();
     instance = null;
 }
        void FixedUpdate()
        {
            if (instance == null)
            {
                instance = this;
            }

            if (instance != this)
            {
                return;
            }

            RTClient.GetInstance().Update();
        }