private void OnTriggerEnter2D(Collider2D collision) { currentLight = collision.gameObject.GetComponent <Lights.Point>(); Debug.Log(collision); LightColor = currentLight.LightColor; ShadowColor = currentLight.ShadowColor; Range = currentLight.Range; }
private void OnTriggerExit2D(Collider2D collision) { currentLight = null; }