Esempio n. 1
0
    void Start()
    {
        mainPanel = FindObjectOfType<EvoSubTreePanel>();
        panelInfo = mainPanel.panelInfo;

        icon = GetComponent<Image>();
        defaultColor = icon.color;
        sprite = icon.sprite;
        texture = sprite.texture;

        tForm = gameObject.GetComponent<RectTransform>();

        width = tForm.sizeDelta.x * tForm.localScale.x * MotherPanel.GetScaleMultiplier();
        height = tForm.sizeDelta.y * tForm.localScale.y * MotherPanel.GetScaleMultiplier();

        xMult = (Screen.width / width);
        yMult = (Screen.height / height);
    }
Esempio n. 2
0
    void Awake()
    {
        exPanel = FindObjectOfType<ExpandedPanel>();
        mainPanel = FindObjectOfType<EvoSubTreePanel>();
        tree = exPanel.evoTree;
        nameHeader = GetComponentInChildren<Text>();

        Deactivate();
    }