private void OnMouseEnter(BuildingSystem.ClickMode obj) { if (obj == BuildingSystem.ClickMode.Normal) { Cursor.SetCursor(null, Vector2.zero, cursorMode); image.SetActive(false); } else if (obj == BuildingSystem.ClickMode.Destroy) { Cursor.SetCursor(cursorTexture, hotSpot, cursorMode); image.SetActive(true); } else if (obj == BuildingSystem.ClickMode.Road) { Cursor.SetCursor(null, Vector2.zero, cursorMode); image.SetActive(false); } }
public void ButtonChange(BuildingSystem.ClickMode clickMode) { if (clickMode == BuildingSystem.ClickMode.Destroy) { stop.interactable = false; resume.interactable = false; twoX.interactable = false; threeX.interactable = false; } else if (clickMode == BuildingSystem.ClickMode.Normal) { stop.interactable = true; resume.interactable = true; twoX.interactable = true; threeX.interactable = true; } else if (clickMode == BuildingSystem.ClickMode.Road) { stop.interactable = true; resume.interactable = true; twoX.interactable = true; threeX.interactable = true; } }
public void ModeChanged(BuildingSystem.ClickMode m) { onModeChanged?.Invoke(m); }