12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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<TipPanel>().DBJNext();
- isEnable = true;
- TimeComponent.Instance.AddTimer(0.5f, () =>
- {
- Animator.Play("dabaojianshan");
- isEnable = false;
- });
- }
- }
|