private void OnTriggerEnter(Collider other) { if (other.CompareTag("Cubo")) { UI_Manager.sharedInstance.AddPoint(penalization); fadeImage.FadeImageObj(); spawnerLineCube.ChangeZone(other.gameObject); } }
public void CutCube(GameObject cubo) { var cuboDestroy = cubo.GetComponent <Cube>(); if ((cuboDestroy.isVertical && inZone && actionClick.cubeVertical && actionClick.canDesroy) || (!cuboDestroy.isVertical && inZone && actionClick.cubeHorizontal && actionClick.canDesroy)) { // Cambia de posición al cubo y material spawnerLineCube.ChangeZone(cubo); // Add Point sendPoints.SendPointsScore(); } else if ((!cuboDestroy.isVertical && inZone && actionClick.cubeVertical && actionClick.canDesroy) || (cuboDestroy.isVertical && inZone && actionClick.cubeHorizontal && actionClick.canDesroy)) { // Cambia de posición al cubo spawnerLineCube.ChangeZone(cubo); // Penalizacón UI_Manager.sharedInstance.AddPoint(FAULT); } }