private void OnMouseExit() { if (!BuildUI.IsReadyToBuild()) { renderer.material.color = startColor; } }
private void OnMouseEnter() { if (!BuildUI.IsReadyToBuild()) { renderer.material.color = Color.yellow; } }
private void OnMouseDown() { if (!BuildUI.IsReadyToBuild() && !isClicked && isFree) { BuildUI.CreateTowerBuildUI(this.transform); isClicked = true; BuildUI.ChangeBuildBool(); } else if (BuildUI.IsReadyToBuild() && isClicked && isFree) { BuildUI.DestroyUI(); isClicked = false; BuildUI.ChangeBuildBool(); } }