Ejemplo 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);
         }
     }
 }
Ejemplo n.º 2
0
 private void OnMouseEnter()
 {
     if (IsInCorrectScene())
     {
         if (!deathManager.IsDead() && !pauseManager.IsPaused())
         {
             if (masterTowerTowerScript.IsPlayerInThisTower() == false)
             {
                 return;
             }
             icosphereLight.intensity = hoverIntensity;
             mouseCursorManage.SetGreenCursor();
         }
     }
 }
Ejemplo n.º 3
0
 private void OnMouseEnter()
 {
     if (IsInCorrectScene() == false)
     {
         return;
     }
     //if (GetComponent<TeleportPlace>() == null) return;
     if (IsAround(player.transform, playerSpawnOnTower) == false)
     {
         mouseCursorManage.SetTeleportCursor();
         return;
     }
     if (IsMasterTower() == false)
     {
         mouseCursorManage.SetGreenCursor();
         return;
     }
     if (IsMasterTower() == true)
     {
         return;
     }
 }