mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 22:27:58 +01:00
50 lines
916 B
C#
50 lines
916 B
C#
using Spine.Unity;
|
|
using UnityEngine;
|
|
|
|
namespace Fie.UI
|
|
{
|
|
[RequireComponent(typeof(SkeletonAnimation))]
|
|
public class FieGameUIHeaderFooter : FieGameUIBase
|
|
{
|
|
public const string HEADER_FOOTER_SHOW_ANIIMATION_NAME = "show";
|
|
|
|
public const string HEADER_FOOTER_HIDE_ANIIMATION_NAME = "hide";
|
|
|
|
public GameObject header;
|
|
|
|
public GameObject footer;
|
|
|
|
public Transform headerRootTransform;
|
|
|
|
public Transform footerRootTransform;
|
|
|
|
public Transform Ability1;
|
|
|
|
public Transform Ability2;
|
|
|
|
public Transform Ability3;
|
|
|
|
public SkeletonAnimation _mySkeleton;
|
|
|
|
public void Awake()
|
|
{
|
|
_mySkeleton = GetComponent<SkeletonAnimation>();
|
|
}
|
|
|
|
public void Show()
|
|
{
|
|
if (!(_mySkeleton == null))
|
|
{
|
|
_mySkeleton.state.SetAnimation(0, "show", loop: false);
|
|
}
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
if (!(_mySkeleton == null))
|
|
{
|
|
_mySkeleton.state.SetAnimation(0, "hide", loop: false);
|
|
}
|
|
}
|
|
}
|
|
}
|