void OnTriggerEnter2D(Collider2D coll) { if (!nextPlatformActivated && coll.tag == GameplayConstants.TAG_Player) { nextPlatformActivated = true; pm.AddPlatformSection(); } }
void OnTriggerEnter2D(Collider2D coll) { if (nextPlatformActivated || !coll.CompareTag(TagNames.PLAYER)) { return; } nextPlatformActivated = true; pm.AddPlatformSection(); }