28 lines
576 B
C#
28 lines
576 B
C#
using EasyInject.Attributes;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
/// <summary>
|
|
/// ÕÛµþºÍÊÕÆð
|
|
/// </summary>
|
|
[GameObjectBean(ENameType.GameObjectName)]
|
|
public class FoldAndPutAwayButton : MonoBehaviour
|
|
{
|
|
private Animator animator;
|
|
public Button button;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
button.onClick.AddListener(ClickFold);
|
|
animator = GetComponent<Animator>();
|
|
}
|
|
|
|
public void ClickFold()
|
|
{
|
|
animator.speed = 1;
|
|
}
|
|
private void Close()
|
|
{
|
|
animator.speed = 0;
|
|
}
|
|
}
|