void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player")) { LightManager.GetLightManager().SetLight(lightToActive); Destroy(gameObject); } }
// Update is called once per frame void Update() { if (LightManager.GetLightManager().currentLight == activationLight) { active.SetActive(true); inactive.SetActive(false); } else { active.SetActive(false); inactive.SetActive(true); } }