Пример #1
0
    public IEnumerator FreshView(PopupWindowData data)
    {
        Image_Content.sprite = data.ShowSprite;
        var rect = gameObject.GetComponent <RectTransform>();

        switch (data.Type)
        {
        case EPopupType.Act:

            rect.anchoredPosition = data.OffsetPos;
            break;

        case EPopupType.Item:
            break;
        }
        gameObject.SetActive(true);
        rect.sizeDelta = data.Size;

        yield break;
    }
Пример #2
0
    public IEnumerator Open(PopupWindowData data)
    {
        var element = CreateWindow();

        yield return(element.FreshView(data));
    }