Example #1
0
 private void OnMouseExit()
 {
     if (!BuildUI.IsReadyToBuild())
     {
         renderer.material.color = startColor;
     }
 }
Example #2
0
 private void OnMouseEnter()
 {
     if (!BuildUI.IsReadyToBuild())
     {
         renderer.material.color = Color.yellow;
     }
 }
Example #3
0
 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();
     }
 }