void OnTriggerExit2D(Collider2D collider) { if (s_CurrentLevel != this) { return; } s_CurrentLevel = null; }
void OnTriggerEnter2D(Collider2D collider) { if (collider.gameObject.tag != "Player") { return; } if (s_CurrentLevel == this) { return; } s_CurrentLevel = this; _gameController.CollectCheckpoint(transform.parent); }