Exemplo n.º 1
0
    void OnMouseOver()
    {
        if (gameManager.IsGameOver() || gameManager.isGamePaused())
        {
            enabled = false;
            return;
        }

        if (isPlaceable)
        {
            if (towerFactory.IsTowerLimitReached())
            {
                placeTowerIndicator.gameObject.SetActive(false);
                limitReachedIndicator.gameObject.SetActive(true);
                towerFactory.GetTowerToMove().baseWaypoint.limitReachedIndicator.gameObject.SetActive(true);
            }
            else
            {
                placeTowerIndicator.gameObject.SetActive(true);
            }
        }
        else
        {
            cantPlaceIndicator.gameObject.SetActive(true);
        }
    }