Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
| | |
| | | public override void Init() |
| | | { |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize; |
| | | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent; |
| | | ParseConfig(); |
| | | } |
| | | |
| | | public override void Release() |
| | | { |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize; |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent; |
| | | } |
| | | |
| | | void OnBeforePlayerDataInitialize() |
| | |
| | | UpdateRedpoint(); |
| | | } |
| | | |
| | | |
| | | void OnFuncStateChangeEvent(int funcID) |
| | | { |
| | | if (DTC0403_tagPlayerLoginLoadOK.finishedLogin && funcID == (int)FuncOpenEnum.DaySign) |
| | | { |
| | | RightFuncInHome.ListenWindowEx("SignWin"); |
| | | PopupWindowsProcessor.Instance.Add("SignWin"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //状态:0-不可签到;1-已签到;2-可补签;3-已领取 |
| | | public int GetSignDayState(int day) |
| | | { |
| | |
| | | //延迟处理特效大小 |
| | | async UniTask RefreshEffect(ItemModel equip) |
| | | { |
| | | await UniTask.DelayFrame(3); |
| | | // await UniTask.DelayFrame(3); |
| | | // if (effectID == 0) |
| | | // { |
| | | // uieffect.Stop(); |
| | | // } |
| | | // else |
| | | // { |
| | | // uieffect.Stop(); |
| | | // uieffect.effectId = effectID; |
| | | // //计算高度缩放比例 特效显示依赖rect的排版 |
| | | // uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1); |
| | | // uieffect.Play(); |
| | | // } |
| | | int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1]; |
| | | if (effectID == 0) |
| | | { |
| | | uieffect.Stop(); |
| | | } |
| | | else |
| | | { |
| | | uieffect.Stop(); |
| | | uieffect.effectId = effectID; |
| | | //计算高度缩放比例 特效显示依赖rect的排版 |
| | | uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1); |
| | | uieffect.Play(); |
| | | } |
| | | |
| | | //二次处理放大效果 |
| | | await UniTask.Delay(100); |
| | |
| | | [SerializeField] Image itemIcon; |
| | | [SerializeField] Text numText; |
| | | [SerializeField] Button wayBtn; |
| | | public int itemID; |
| | | |
| | | int m_itemID; |
| | | public int itemID |
| | | { |
| | | get |
| | | { |
| | | return m_itemID; |
| | | } |
| | | set |
| | | { |
| | | m_itemID = value; |
| | | if (m_itemID != 0) |
| | | { |
| | | Display(true); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void Start() |
| | | { |
| | | if (itemID != 0) |
| | | { |
| | | itemIcon.SetOrgSprite(ItemConfig.Get(itemID).IconKey); |
| | | } |
| | | |
| | | wayBtn.AddListener(()=> |
| | | { |
| | |
| | | public void RestoreSubUI() |
| | | { |
| | | if (functionOrder != -1) |
| | | { |
| | | Debug.Log("RestoreSubUI functionOrder " + functionOrder); |
| | | return; |
| | | } |
| | | if (lastWinOrder == -1) |
| | | { |
| | | lastWinOrder = 0; |
| | | } |
| | | |
| | | Debug.Log("RestoreSubUI lastWinOrder " + lastWinOrder); |
| | | OnTabButtonClicked(lastWinOrder); |
| | | } |
| | | |
| | |
| | | public void ShowFuncCol(bool _isShow) |
| | | { |
| | | isShow = _isShow; |
| | | funcCol.DOLocalMove(isShow ? showPoint.localPosition : hidePoint.localPosition, 0.3f); |
| | | funcCol?.DOLocalMove(isShow ? showPoint.localPosition : hidePoint.localPosition, 0.3f); |
| | | if (isShow) |
| | | { |
| | | ShowBtns(); |
| | |
| | | listenWindowName = ""; |
| | | } |
| | | |
| | | //外部使用 |
| | | public static void ListenWindowEx(string _listenWindowName) |
| | | { |
| | | listenWindowName = _listenWindowName; |
| | | } |
| | | } |
| | | |