using EasyInject.Attributes; using UnityEngine; using UnityEngine.UI; /// /// ÕÛµþºÍÊÕÆð /// [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(); } public void ClickFold() { animator.speed = 1; } private void Close() { animator.speed = 0; } }