Esempio n. 1
0
    // 更新TIPS 信息
    void UpdateTipsInfo(int skillId)
    {
        SkillInfo info = GameTable.SkillTableAsset.Lookup(skillId);

        if (null == info)
        {
            return;
        }

        CDInfo cdInfo = GameTable.CDTableAsset.Lookup(info.CoolDown);

        m_skillName.text = info.Name;
        m_skillDes.text  = info.Description;
        m_skillCD.text   = UICardDetail.GetInstance().GetTimeString(cdInfo.CDTime);

//        int needLevel = 0;
        // tips 位置
        float postionY = 98f;

        // 主动技能类型
        if (info.SkillType == (int)ENSkillType.enSkill)
        {
            postionY = 98f;
        }
        else
        {
            postionY = -17f;
        }

        // 设置位置
        m_tips.LocalPositionY(postionY);
    }
Esempio n. 2
0
    // 长按 响应
    void OnClickLongPressItem(object sender, EventArgs e)
    {
        GameObject obj   = (GameObject)sender;
        Parma      param = obj.GetComponent <Parma>();

        if (param.m_guid.Equals(CSItemGuid.Zero))
        {
            return;
        }

        Debug.Log("OnClickLongPressItem点击的道具的格子ID 为:" + param.m_id);

        // 扩容
        if (-1 == param.m_id)
        {
        }
        else
        {
            CardBag.Singleton.m_curOptinGuid = param.m_guid;

            UICardDetail.GetInstance().SetPreCallback(PreCardDetail);
            UICardDetail.GetInstance().SetNextCallback(NextCardDetail);
            CardBag.Singleton.OnShowCardDetail();
        }
    }
Esempio n. 3
0
    public void NextCardDetail()
    {
        int index = CardBag.Singleton.m_curOptinIndex + 1;

        UpdateCardDetail(index);
        index = CardBag.Singleton.m_curOptinIndex + 1;
        UICardDetail.GetInstance().ShowNext(IsHaveCardDetail(index));
    }
Esempio n. 4
0
    // 显示卡牌详细界面
    void OnShowCardDetail(GameObject obj)
    {
        m_option.gameObject.SetActive(false);

        UICardDetail.GetInstance().SetPreCallback(PreCardDetail);
        UICardDetail.GetInstance().SetNextCallback(NextCardDetail);

        CardBag.Singleton.OnShowCardDetail();
    }
Esempio n. 5
0
//    GameObject m_pre    = null;
//    GameObject m_next   = null;

    static public UICardDetail GetInstance()
    {
        UICardDetail self = UIManager.Singleton.GetUIWithoutLoad <UICardDetail>();

        if (self != null)
        {
            return(self);
        }
        self = UIManager.Singleton.LoadUI <UICardDetail>("UI/UICardDetails", UIManager.Anchor.Center);
        return(self);
    }
Esempio n. 6
0
    private IEnumerator CoroutineAnimationEnd(float timeLength)
    {
        yield return(new WaitForSeconds(timeLength));

        foreach (int value in GachaPanelProp.Singleton.m_slotList)
        {
            CSItem item = User.Singleton.ItemBag.GetItem(value);
            CardBag.Singleton.OnShowCardDetail(item, true);
            UICardDetail.GetInstance().RegisterCallBack(EndGachaAndShowShopPanel);
            MainUIManager.Singleton.ShowAllNeedShowWnd();
        }
        HideWindow();
    }
Esempio n. 7
0
    // 长按 显示卡牌详细界面
    void OnClickLongPressItem(object sender, EventArgs e)
    {
        GameObject obj   = (GameObject)sender;
        Parma      param = obj.GetComponent <Parma>();

        if (param.m_guid.Equals(CSItemGuid.Zero))
        {
            return;
        }

        UICardDetail.GetInstance().SetPreCallback(PreCardDetail);
        UICardDetail.GetInstance().SetNextCallback(NextCardDetail);
        // 显示只显示返回按钮的 卡牌详细界面
        CardBag.Singleton.OnShowCardDetail(CardBag.Singleton.GetCardByGuid(param.m_guid), true);
    }
Esempio n. 8
0
    // 播放每个奖励的动画
    IEnumerator CoroutinePlayAnmiationPrizeCard()
    {
        if (m_prizeCardDataList.Count == 0)
        {
            yield return(new WaitForSeconds(0));

            //
            m_quitBox.SetActive(true);
            m_fastBox.SetActive(false);
        }
        else
        {
            GameObject obj = null;
            // 是否继续显示
            bool bShowNext = true;
            foreach (KeyValuePair <GameObject, UICardHead> item in m_prizeCardDataList)
            {
                // 如果 平常速度
                if (!BattleSummary.Singleton.m_fastPrizeCard)
                {
                    item.Key.GetComponent <Animation>().Play("ui-battledatasummarycontract-00");

                    AnimationClip clip = item.Key.GetComponent <Animation>().GetClip("ui-battledatasummarycontract-00");

                    //
                    yield return(new WaitForSeconds(clip.length));

                    // 播完动画 显示头像
                    item.Value.ShowWindow();
                    item.Value.ShowCard();

                    item.Value.SetCardLoveShow(false);
                    item.Value.SetCardInfoShow(false);



                    if (item.Value.m_showCard != null)
                    {
                        // 如果 是新卡 则要 显示卡牌详情
                        if (item.Value.m_bNew)
                        {
                            UICardDetail.GetInstance().RegisterCallBack(CardDetailCallBack);
                            CardBag.Singleton.OnShowCardDetail(item.Value.m_showCard, true);
                            bShowNext = false;
                        }
                    }
                }
                // 否则快速
                else
                {
                    //  显示头像
                    item.Value.ShowWindow();
                    item.Value.ShowCard();

                    item.Value.SetCardLoveShow(false);
                    item.Value.SetCardInfoShow(false);
                }
                obj = item.Key;

                obj.transform.Find("Contract").gameObject.SetActive(false);
                break;
            }

            if (null != obj)
            {
                m_prizeCardDataList.Remove(obj);
            }
            if (bShowNext)
            {
                MainGame.Singleton.StartCoroutine(CoroutinePlayAnmiationPrizeCard());
            }
        }
    }
Esempio n. 9
0
 //长按显示卡牌详情界面 只带返回按钮
 void PressCardHead(CSItem card, int materialId)
 {
     // 下面代码的意思是 在显示的时候才创建UICardDetail界面
     UICardDetail.GetInstance();
     CardBag.Singleton.OnShowCardDetail(card, true);
 }