Ejemplo n.º 1
0
    private void ShowAnimationOfIcon(SpriteRenderer icon)
    {
        Animation2D iconAnimation = icon.GetComponent <Animation2D>();

        if (iconAnimation)
        {
            iconAnimation.Initialize();

            iconAnimation.Show();
            iconAnimation.Play();
        }
    }
Ejemplo n.º 2
0
    private void HideAnimationOfIcon(SpriteRenderer icon)
    {
        Animation2D iconAnimation = icon.GetComponent <Animation2D>();

        if (iconAnimation)
        {
            iconAnimation.Initialize();

            iconAnimation.Stop();
            iconAnimation.Hide();
        }
    }