void Update() { if (lives <= 0) { buttonManager.ChangeToLost(); } Ray ray = mainCamera.ScreenPointToRay(mousePosition); //if(Physics.Raycast(ray, out hit, maxDistance, mask, QueryTriggerInteraction.UseGlobal)) //{ // if(hit.transform.CompareTag("BuildableSurface")) // { // colorizedSurface = hit.transform.GetComponent<BuildableSurface>(); // if(!colorizedSurface.isSelected) // { // colorizedSurface.ChangeColor(hoverColor); // } // } // else // { // if(colorizedSurface != null && !colorizedSurface.isSelected) // { // colorizedSurface.ChangeColor(startColor); // colorizedSurface = null; // } // } //} }
void Update() { if (isDragging) //Si estamos pulsando y arrastrando el ratón. { DragUpdate(); } if (selectedUnit != null) { selectedUnit.isSelected = true; } if (selectedUnits.Count > 0) { for (int i = 0; i < selectedUnits.Count; i++) { selectedUnits[i].isSelected = true; } } if (selectableUnits.Count == 0) { buttonManager.ChangeToLost(); } }