private void OnTriggerEnter(Collider other) { if (other.CompareTag("Obstacle")) { var par = Instantiate(particle, transform.position, Quaternion.Euler(-90, 0, 0)); par.Emit(5); if (amIMainCube) { levelManager.Lose(); Destroy(); } else { levelManager.currentCubesIndices[row, column] = 0; levelManager.Checking(); Destroy(); } } }