50 【主界面】核心主体 - 增加等级功能开启限制
153 【武将】招募系统 - 免费次数显示和
| | |
| | | |
| | | if (funcBtn != null) |
| | | { |
| | | funcBtn.interactable = IsOpen; |
| | | // 禁用按钮的点击事件,但不改变透明度 |
| | | funcBtn.enabled = IsOpen; |
| | | } |
| | | |
| | | |
| | |
| | | return freeCountToday < funcSet.DailyFreeCount;
|
| | | }
|
| | |
|
| | |
|
| | | public int GetFreeCountToday(int type)
|
| | | {
|
| | | XBTypeInfo typeInfo = GetXBInfoByType(type);
|
| | | if (typeInfo != null)
|
| | | {
|
| | | return typeInfo.freeCountToday;
|
| | | }
|
| | | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetDailyFreeCount(int type)
|
| | | {
|
| | | return TreasureSetConfig.Get(type).DailyFreeCount;
|
| | | }
|
| | |
|
| | | //获取还需多少次可得幸运奖励
|
| | | public int GetNextXBCountForBigAward(int type, out List<int> qualityList)
|
| | | {
|
| | |
| | | call1ItemIcon.SetOrgSprite(IconKey); |
| | | var itemCount = PackManager.Instance.GetItemCountByID(PackType.Item, funcSet.CostItemID); |
| | | |
| | | if (HappyXBModel.Instance.IsHaveFreeXB((int)HeroUIManager.Instance.selectCallType)) |
| | | int todayFreeCount = HappyXBModel.Instance.GetFreeCountToday((int)HeroUIManager.Instance.selectCallType); |
| | | int dayMaxCount = HappyXBModel.Instance.GetDailyFreeCount((int)HeroUIManager.Instance.selectCallType); |
| | | if (todayFreeCount < dayMaxCount) |
| | | { |
| | | call1Text.text = Language.Get("L1127"); |
| | | call1Text.text = Language.Get("L1127") + (dayMaxCount - todayFreeCount) + "/" + dayMaxCount; |
| | | } |
| | | else |
| | | { |
| | |
| | | call1ItemIcon.SetOrgSprite(IconKey); |
| | | call10ItemIcon.SetOrgSprite(IconKey); |
| | | var itemCount = PackManager.Instance.GetItemCountByID(PackType.Item, funcSet.CostItemID); |
| | | if (HappyXBModel.Instance.IsHaveFreeXB((int)HappXBTitle.HeroCallAdvanced)) |
| | | |
| | | int todayFreeCount = HappyXBModel.Instance.GetFreeCountToday((int)HappXBTitle.HeroCallAdvanced); |
| | | int dayMaxCount = HappyXBModel.Instance.GetDailyFreeCount((int)HappXBTitle.HeroCallAdvanced); |
| | | if (todayFreeCount < dayMaxCount) |
| | | { |
| | | call1Text.text = Language.Get("L1127"); |
| | | call1Text.text = Language.Get("L1127") + (dayMaxCount - todayFreeCount) + "/" + dayMaxCount; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | public static void SetInteractable(this Button _btn, Text _btnText, bool _interactable) |
| | | // 设置按钮是否可点击,且置灰,默认取第一个文本;图片需用ImageEx组件 |
| | | // 更多功能请使用SetColorful |
| | | public static void SetInteractable(this Button _btn, bool _interactable, Text _btnText = null) |
| | | { |
| | | if (_btn != null) |
| | | { |
| | |
| | | imageEx.gray = !_interactable; |
| | | } |
| | | } |
| | | if (_btnText == null) |
| | | _btnText = _btn.GetComponentInChildren<Text>(); |
| | | if (_btnText != null) |
| | | { |
| | | _btnText.color = UIHelper.GetUIColor(_interactable ? TextColType.NavyBrown : TextColType.White); |
| | | //_btnText.color = _btnText.color.SetA(_interactable ? 1 : 0.5f); |
| | | //false 灰色,true 原色 |
| | | if (!_interactable) |
| | | _btnText.text = UIHelper.AppendColor(TextColType.NavyGray, _btnText.text); //不改变组件颜色,只改变显示颜色 |
| | | else |
| | | _btnText.text = UIHelper.AppendColor(_btnText.color, _btnText.text); |
| | | } |
| | | } |
| | | |