Exemplo n.º 1
0
 void OnMouseEnter()
 {
     if (IsInCorrectScene())
     {
         if (!deathManager.IsDead())
         {
             if (isAlreadBuilt == true)
             {
                 return;
             }
             if (EventSystem.current.IsPointerOverGameObject())
             {
                 return;
             }
             //if the towerToBuild variable is null dont do anything
             if (buildManager.GetTowerToBuild() == null)
             {
                 return;
             }
             mouseCursorManager.SetGreenCursor();
             GameObject selecTowerInst = (GameObject)Instantiate(buildManager.GetSelectionTowerToBuild(), transform.position, transform.rotation);
             selecTowerInst.transform.rotation = Quaternion.Euler(0, 0, 0);
             buildManager.SetSelectionTowerToBuildInstance(selecTowerInst);
         }
     }
 }
Exemplo n.º 2
0
 private void OnMouseEnter()
 {
     if (IsInCorrectScene())
     {
         if (!deathManager.IsDead() && !pauseManager.IsPaused())
         {
             if (masterTowerTowerScript.IsPlayerInThisTower() == false)
             {
                 return;
             }
             icosphereLight.intensity = hoverIntensity;
             mouseCursorManage.SetGreenCursor();
         }
     }
 }