Пример #1
0
        private void Unload()
        {
            foreach (LightController lightController in lightControllers)
            {
                lightController.ToggleLight(false);
                UnityEngine.Object.DestroyImmediate(lightController);
            }

            if (timeCheck != null)
            {
                timeCheck.Destroy();
            }

            lightControllers.Clear();
            ins = null;
        }
Пример #2
0
 private void OnServerInitialized()
 {
     ins = this;
     ServerMgr.Instance.StartCoroutine(CreateAllLights(BaseEntity.serverEntities.Where(x => x is BaseOven || x is SearchLight)));
     isInitialized = true;
 }