Esempio n. 1
0
    void onClick_HandInputBtn_Btn(GameObject caster)
    {
        if (!IsHavePurchaseTimes())
        {
            TipsManager.Instance.ShowTips("今日购买已达上限,请明日再来");
            return;
        }
        UIPanelManager mgr = DataManager.Manager <UIPanelManager>();

        if (mgr.IsShowPanel(PanelID.HandInputPanel))
        {
            mgr.HidePanel(PanelID.HandInputPanel);
        }
        else
        {
            mgr.ShowPanel(PanelID.HandInputPanel, data: new HandInputPanel.HandInputInitData()
            {
                maxInputNum             = (uint)CurrentMallData.MaxPurchaseNum,
                onInputValue            = OnHandInput,
                onClose                 = OnCloseInput,
                showLocalOffsetPosition = new Vector3(308, 113, 0),
            });
        }
    }
Esempio n. 2
0
    public void OnCompeleteCopy(stCompleteCopyUserCmd_S cmd)
    {
        m_uCopyCountDown       = cmd.close_time;
        m_uCopyFinishCountDown = cmd.close_time;
        CopyDataBase cdb = GameTableManager.Instance.GetTableItem <CopyDataBase>(m_uEnterCopyID);

        if (cdb != null)
        {
            if (cdb.IsShowFinish)
            {
                UIPanelManager upMger = DataManager.Manager <UIPanelManager>();
                upMger.ShowPanel(PanelID.FBResult);
                TimerAxis.Instance().SetTimer(m_uCopyFinishTimerID, 1000, this, cmd.close_time);
                //延迟两秒显示副本奖励
                CoroutineMgr.Instance.DelayInvokeMethod(2f, () =>
                {
                    if (upMger.IsShowPanel(PanelID.FBResult))
                    {
                        upMger.HidePanel(PanelID.FBResult);
                    }
                    if (cdb.havePassReward != 0 && !string.IsNullOrEmpty(cdb.rewardList))
                    {
                        string[] rewardListStr           = cdb.rewardList.Split(new char[] { ';' });
                        List <CommonAwardData> cmADDAtas = null;
                        CommonAwardData tempcmAD         = null;
                        string[] tempRewardArray         = null;
                        uint tempItemID = 0;
                        uint tempNum    = 0;
                        if (null != rewardListStr && rewardListStr.Length > 0)
                        {
                            for (int i = 0, max = rewardListStr.Length; i < max; i++)
                            {
                                if (string.IsNullOrEmpty(rewardListStr[i]))
                                {
                                    continue;
                                }
                                tempRewardArray = rewardListStr[i].Split(new char[] { '_' });
                                if (null == tempRewardArray || tempRewardArray.Length != 2)
                                {
                                    continue;
                                }
                                if (!string.IsNullOrEmpty(tempRewardArray[0]) && uint.TryParse(tempRewardArray[0].Trim(), out tempItemID) &&
                                    !string.IsNullOrEmpty(tempRewardArray[1]) && uint.TryParse(tempRewardArray[1].Trim(), out tempNum)
                                    )
                                {
                                    tempcmAD = new CommonAwardData(tempItemID, tempNum);
                                    if (null == cmADDAtas)
                                    {
                                        cmADDAtas = new List <CommonAwardData>();
                                    }
                                    CopyInfo info = GetCopyInfoById(m_uEnterCopyID);
                                    if (!info.IsFinished)
                                    {
                                        cmADDAtas.Add(tempcmAD);
                                    }
                                }
                            }
                            //超过收益次数  还是显示奖励界面但是没有奖励道具
                            if (null != cmADDAtas)
                            {
                                upMger.ShowPanel(PanelID.FBPassAwardPanel, data: cmADDAtas);
                            }
                        }
                    }
                });
            }
        }
    }