// Start is called before the first frame update void Start() { controller = this; player = GameObject.FindGameObjectWithTag("Player"); timeController = GameObject.FindGameObjectWithTag("TimeController").GetComponent <DayNightCicle>(); }
void Awake() { if (instance != null) { Debug.LogWarning("More than one instance of DayNightCicle found!"); return; } instance = this; }