Beispiel #1
0
    private void SetupVisualElements()
    {
        MapSquareImageHolder imageHolder = FindObjectOfType <MapSquareImageHolder>();

        if (!tabbed)
        {
            tabbedIcon.enabled = false;
            mainIcon.enabled   = true;

            mainIcon.sprite = imageHolder.GetMenuIconByName(label);
            tabbedText.text = "";
            mainText.text   = label;

            counterSquare.SetActive(true);
            counterSquare.GetComponentInChildren <TextMeshProUGUI>().text = number.ToString();
        }
        else
        {
            tabbedIcon.enabled = true;
            mainIcon.enabled   = false;

            tabbedIcon.sprite = imageHolder.GetMenuIconByName(label);
            tabbedText.text   = label;
            mainText.text     = "";

            counterSquare.SetActive(false);
        }
    }
    public void SetupGrid(Job.JobArea newMapType, int mapSize)
    {
        mapType              = newMapType;
        isInitialized        = true;
        activeRows           = new List <MapSquareRow>();
        mapSquareImageHolder = FindObjectOfType <MapSquareImageHolder>();
        mapSquareImageHolder.InitializeMapSquareImageHolder(mapType);

        SetupSquareLevels();
        SetupMap(mapType, mapSize, GetVerticalModifier(mapType), GetInitialEnemySpawnChance(mapType));
    }
    public void InitializeMapHackMenu(HackTarget newHackTarget)
    {
        mapSquare  = currentNodeMenu.GetMapSquare();
        hackTarget = newHackTarget;
        MapSquareImageHolder imageHolder = FindObjectOfType <MapSquareImageHolder>();

        hackTypeImage.sprite = imageHolder.GetImageForHackOrPOI(hackTarget.getHackType());
        hackTypeIcon.sprite  = imageHolder.GetButtonImageByName(hackTarget.getHackType(), true);

        SetupHackButtonOrPoints();
        SetupHackOptionsLines();
        CheckHackCosts();
    }
Beispiel #4
0
 private void Start()
 {
     activeSquares        = new List <MapSquare>();
     mapSquareImageHolder = FindObjectOfType <MapSquareImageHolder>();
 }