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