备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using System.Collections;
using asap.core;
using UnityEngine;
using UnityEngine.UI;
public class EventLuckMagicSkipAnimationBtn : MonoBehaviour
{
private bool _doesSkip;
[SerializeField] private Button btn;
[SerializeField] private GameObject mark;
private float _clickInterval = 0.3f;
private void Start()
{
btn.onClick.AddListener(OnClick);
}
public void Init()
{
UpdateState();
}
private void UpdateState()
{
var model = GContext.container.Resolve<EventLuckMagicModel>();
_doesSkip = model.DoesSkipAnimation;
mark.SetActive(_doesSkip);
}
private void OnClick()
{
var model = GContext.container.Resolve<EventLuckMagicModel>();
model.DoesSkipAnimation = !model.DoesSkipAnimation;
UpdateState();
btn.interactable = false;
StopAllCoroutines();
StartCoroutine(ResetCountDown());
}
private IEnumerator ResetCountDown()
{
yield return new WaitForSeconds(_clickInterval);
btn.interactable = true;
}
}