private void OnTriggerEnter2D(Collider2D collision) { if (ignoreTrigger) { return; } else if (collision.tag == "Player") { gate.OpenGate(); } }