}                                                              //Singleton
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #2
0
        public void TestInit()
        {
            ServiceContainer.Instance.ClearAllServices();
            ServiceContainer.Instance.AddService <ITelescopeService>(new MockTelescopeService());
            _mgr = TelescopeManager.Instance;
            _svc = (MockTelescopeService)ServiceContainer.Instance.GetService <ITelescopeService>();

            bool retval = _mgr.Connect(ScopeID);

            Assert.AreEqual(true, retval);

            Thread.Sleep(_startupDelayMs);
        }