protected override void OnDestroy() { KS_SaveLoad.OnSave -= OnSave; KS_SaveLoad.OnLoad -= OnLoad; instance = null; base.OnDestroy(); }
// Use this for initialization void Start() { StarStart(); instance = this; timeManager = KS_TimeManager.Instance; timeManager.OnTimeUpdate += OnTimeUpdate; mainLight = sun.GetComponent <Light>(); skyMat = RenderSettings.skybox; }
protected override void Awake() { if (instance != null) { Destroy(this); } instance = this; StarAwake(); KS_SaveLoad.OnSave += OnSave; KS_SaveLoad.OnLoad += OnLoad; base.Awake(); }