Exemplo n.º 1
0
    //宠物红点提示
    public void UpdateFellowRedTip()
    {
        PlayerData playerdata = GameManager.gameManager.PlayerDataPool;

        Games.Fellow.FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;
        if (playerdata != null && m_PartnerCountTip != null && container != null)
        {
            if (container.GetPartnerCanLearnSkill().Count > 0 || container.GetPartnerCanUpdateSkill().Count > 0 ||
                (playerdata.IsProcreateGoing() && playerdata.IsProcreateWaitReceive()))
            {
                m_PartnerCountTip.gameObject.SetActive(true);
            }
            else
            {
                m_PartnerCountTip.gameObject.SetActive(false);
            }
        }
    }
Exemplo n.º 2
0
    public void UpdateFellowTip()
    {
        Games.Fellow.FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;
        //if (m_PartnerListGrid != null&&m_CurTab == TABCONTENT.TABCONTENT_DEVELOP)
        if (m_PartnerListGrid != null)
        {
            Dictionary <int, List <int> > learnlist  = container.GetPartnerCanLearnSkill();
            Dictionary <int, List <int> > updatelist = container.GetPartnerCanUpdateSkill();
            PartnerFrameItemLogic[]       partners   = m_PartnerListGrid.GetComponentsInChildren <PartnerFrameItemLogic>();
            foreach (PartnerFrameItemLogic pfil in partners)
            {
                if (pfil.FellowInfo == null)
                {
                    continue;
                }
                if (learnlist.ContainsKey(pfil.FellowInfo.DataId) || updatelist.ContainsKey(pfil.FellowInfo.DataId))
                {
                    pfil.SetRedPoint(true);
                }
                else
                {
                    pfil.SetRedPoint(false);
                }
                if (pfil.FellowInfo.Guid == mCurFellowId)
                {
                    OnItemClick(pfil.FellowInfo);
                }
            }
        }
        PlayerData playerdata = GameManager.gameManager.PlayerDataPool;

        if (playerdata != null && CloneRedTip != null)
        {
            if (playerdata.IsProcreateGoing() && playerdata.IsProcreateWaitReceive())
            {
                CloneRedTip.SetActive(true);
            }
            else
            {
                CloneRedTip.SetActive(false);
            }
        }
    }
Exemplo n.º 3
0
 public void OnItemClick(Fellow fellow)
 {
     if (fellow != null && SkillRedTip != null)
     {
         Games.Fellow.FellowContainer  container  = GameManager.gameManager.PlayerDataPool.FellowContainer;
         Dictionary <int, List <int> > learnlist  = container.GetPartnerCanLearnSkill();
         Dictionary <int, List <int> > updatelist = container.GetPartnerCanUpdateSkill();
         if (learnlist.ContainsKey(fellow.DataId) || updatelist.ContainsKey(fellow.DataId))
         {
             SkillRedTip.SetActive(true);
         }
         else
         {
             SkillRedTip.SetActive(false);
         }
         List <int> skills;
         if (updatelist.TryGetValue(fellow.DataId, out skills))
         {
             foreach (GameObject go in SkillElementsUpdate)
             {
                 if (go != null)
                 {
                     go.SetActive(false);
                 }
             }
             int count = skills.Count;
             for (int i = 0; i < count; ++i)
             {
                 if (skills[i] > -1 && skills[i] < SkillElementsUpdate.Length)
                 {
                     SkillElementsUpdate[skills[i]].SetActive(true);
                 }
             }
         }
     }
 }