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();
    }
Пример #2
0
    public void SetupButton(HackTarget newHackTarget)
    {
        hackTarget = newHackTarget;
        Image image = GetComponent <Image>();

        image.enabled = true;
        GetComponent <Button>().enabled = true;
        image.sprite = FindObjectOfType <MapSquareImageHolder>().GetButtonImageByName(hackTarget.getHackType(), hackTarget.GetIsActive());
        if (!hackTarget.GetIsActive())
        {
            GetComponent <Button>().enabled = false;
        }
        hackName.enabled = true;
        hackName.text    = hackTarget.getHackType();
    }