| | |
| | | |
| | | public class FirstChargeWin : FunctionsBaseWin |
| | | { |
| | | |
| | | [SerializeField] ButtonEx btnClose; |
| | | [Header("标签页")] |
| | | [SerializeField] TextEx[] txtTabTitles; |
| | | [SerializeField] ButtonEx[] btnTabs; |
| | |
| | | |
| | | [Header("购买和领取")] |
| | | [SerializeField] ImageEx imgHave; |
| | | [SerializeField] ImageEx imgNoHave; |
| | | [SerializeField] ImageEx imgRed; |
| | | [SerializeField] TextEx txtHave; |
| | | [SerializeField] ButtonEx btnHave; |
| | |
| | | btnHave.SetListener(OnClickHaveButton); |
| | | btnBuy.SetListener(OnClickBuyButton); |
| | | btnPreviewHero.SetListener(OnClickPreviewHero); |
| | | btnClose.SetListener(() => UIManager.Instance.CloseWindow<FirstChargeWin>()); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | functionOrder = GetDefaultTabIndex(); |
| | | base.OnPreOpen(); |
| | | InitRedPoint(); |
| | | |
| | | functionOrder = GetDefaultTabIndex(); |
| | | tabButtons[functionOrder].SelectBtn(true); |
| | | |
| | | int firstId = model.GetFirstIDByTabIndex(functionOrder); |
| | | model.SetClickTabState(firstId); |
| | |
| | | int awardState = firstChargeData.GetHaveState(day); |
| | | bool isAllHave = firstChargeData.IsAllHave(); |
| | | btnHave.interactable = awardState == 2; |
| | | imgNoHave.SetActive(awardState != 2); |
| | | imgHave.SetActive(awardState == 2); |
| | | imgHave.gray = awardState != 2; |
| | | imgRed.SetActive(awardState == 2); |
| | | if (awardState == 2) |
| | | { |