示例#1
0
        /// <summary>
        /// Plays the "in" animation of the game object associated with the given transform.
        /// </summary>
        /// <param name="transform">The transform of the game object to animate.</param>
        /// <param name="animateChildren">Whether the children of the given game object must be animated as well.</param>
        public void AnimateIn(Transform transform, bool animateChildren)
        {
            if (transform.gameObject.activeSelf)
            {
                KAnimator uiAnimator = transform.gameObject.GetComponent <KAnimator>();

                if ((uiAnimator != null) && uiAnimator.enabled)
                {
                    uiAnimator.AnimateIn();
                }

                Button button = transform.gameObject.GetComponent <Button>();

                if (button != null)
                {
                    button.interactable = true;
                }

                if (animateChildren)
                {
                    foreach (Transform childTransform in transform)
                    {
                        AnimateIn(childTransform, animateChildren);
                    }
                }
            }
        }
示例#2
0
    // Use this for initialization
    void Start()
    {
        SetupScoreLabel();
        KAnimator mainAnimator = mainPanel.GetComponent <KAnimator>();

        mainAnimator.AnimateIn();
    }
示例#3
0
    public void ShowMainPanel()
    {
        KAnimator mainAnimator  = mainPanel.GetComponent <KAnimator>();
        KAnimator aboutAnimator = aboutPanel.GetComponent <KAnimator>();

        mainAnimator.AnimateIn();
        aboutAnimator.AnimateOut();
    }
示例#4
0
    public void ShowAboutPanel()
    {
        aboutPanel.SetActive(true);

        KAnimator mainAnimator  = mainPanel.GetComponent <KAnimator>();
        KAnimator aboutAnimator = aboutPanel.GetComponent <KAnimator>();

        mainAnimator.AnimateOut();
        aboutAnimator.AnimateIn();
    }