private void ShowAnimationOfIcon(SpriteRenderer icon) { Animation2D iconAnimation = icon.GetComponent <Animation2D>(); if (iconAnimation) { iconAnimation.Initialize(); iconAnimation.Show(); iconAnimation.Play(); } }
private void HideAnimationOfIcon(SpriteRenderer icon) { Animation2D iconAnimation = icon.GetComponent <Animation2D>(); if (iconAnimation) { iconAnimation.Initialize(); iconAnimation.Stop(); iconAnimation.Hide(); } }