Exemplo 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);
    }
Exemplo n.º 2
0
    void Awake()
    {
        exPanel = FindObjectOfType<ExpandedPanel>();
        mainPanel = FindObjectOfType<EvoSubTreePanel>();
        tree = exPanel.evoTree;
        nameHeader = GetComponentInChildren<Text>();

        Deactivate();
    }