void OnTriggerEnter(Collider other) { if (other.CompareTag("CubeMain")) { if (index > 3) { mainCube.Lose(); } } }
void OnTriggerEnter(Collider other) { if (other.CompareTag("CubeMain") || other.CompareTag("CubePlus")) { mainCube.Lose(); } else if (other.CompareTag("Enemy")) { Destroy(other); } }