public void OnTriggerExit2D(Collider2D other) { if (other.tag == "Player") { player = null; canTrigger = false; } }
public void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { player = other.GetComponent <LightShadowForm>(); canTrigger = true; } }