示例#1
0
    /// <summary>
    /// Show this screen with specified properties.
    /// </summary>
    /// <param name="properties"></param>
    public void Show(IScreenProperties properties = null)
    {
        if (properties != null)
        {
            if (properties is TProps)
            {
                SetProperties((TProps)properties);
            }
            else
            {
                return;
            }
        }

        HierarchyFixOnShow();
        OnPropertiesSet();

        if (!gameObject.activeSelf)
        {
            DoAnimation(openingAnim, OnClosingTransitionFinished, true);
        }
        else
        {
            OpeningTransitionFinished?.Invoke(this);
        }
    }
示例#2
0
    private void OnOpeningTransitionFinished()
    {
        IsVisible = true;

        OpeningTransitionFinished?.Invoke(this);
    }