private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag != "Player") { return; } if (_current != null) { LevelEntryTitle.Show("Entering " + info.levelName); } var previous = _current; _current = info; Events.InvokeLevelChanged(_current, previous); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag != "Player") { return; } if (current != null) { LevelEntryTitle.Show("Entering " + info.levelName); } var previous = current; current = this; if (OnLevelChange != null) { OnLevelChange(current, previous); } }