123456789101112131415161718192021222324252627282930 |
- using System;
- using Game;
- using UnityEngine;
- using UnityEngine.UI;
- namespace Comp
- {
- public class LiftButtonComp : MonoBehaviour
- {
- private Button _button;
- private void Start()
- {
- _button = GetComponent<Button>();
- }
- private void Update()
- {
- if (GameCore.Instance.GetCurState() != null && GameCore.Instance.battleState != null &&
- GameCore.Instance.GetCurState() == GameCore.Instance.battleState && GameCore.Instance.liftTimes > 0)
- {
- _button.interactable = true;
- }
- else
- {
- _button.interactable = false;
- }
- }
- }
- }
|