using System; using System.Collections; using System.Collections.Generic; using Mono; using Mono.UI.Core; using UnityEngine; public class GameObjectOnclick : MonoBehaviour { public Animator Animator; public int Count; void Start() { Animator.Play("dabaojianshan"); } // Update is called once per frame void Update() { } private bool isEnable; private void OnMouseDown() { if (isEnable) { return; } if (Count > 1) { return; } Count++; Animator.Play("init"); UIManager.Instance.GetPanel().DBJNext(); isEnable = true; TimeComponent.Instance.AddTimer(0.5f, () => { Animator.Play("dabaojianshan"); isEnable = false; }); } }