Ejemplo n.º 1
0
 private void SetQuality(Fellow fellow)
 {
     if (m_QualitySprite != null)
     {
         m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
     }
 }
    public override void Init(ChatInfoSelectLinkLogic.Data data, int index)
    {
        base.Init(data, index);

        this.name = index.ToString();

        FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

        if (container == null)
        {
            return;
        }
        Fellow fellow = container.GetFellowByGuid(data.guid);

        if (null == fellow)
        {
            return;
        }

        m_fellowIcon.spriteName    = fellow.GetIcon();
        m_fellowName.text          = fellow.Name;
        m_level.text               = fellow.Level.ToString();
        m_combatValue.text         = fellow.GetCombatValue().ToString();
        m_fellowQuality.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
        this.m_fellowGuid          = data.guid;
    }
    public void SetData(Fellow fellow)
    {
        sprHead.spriteName        = fellow.GetIcon();
        sprHeadQuality.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
        lblName.text         = fellow.Name;
        lblLv.text           = fellow.Level.ToString();
        sprTalent.spriteName = FellowTool.GetFellowElementPic(fellow.ElementAttr);
        lblType.text         = FellowTool.GetFellowTypeText(fellow.GetFellowType(), fellow.GetEvolveLevel());

        if (fellow.IsBabyFellow())
        {
            skillArea.SetActive(false);
            m_cloneArea.SetActive(true);
            SetStarState(false);
            SetCloneInfo(fellow);
        }
        else
        {
            skillArea.SetActive(true);
            m_cloneArea.SetActive(false);
            SetStarState(true);
            SetSkills(fellow);
        }
        UpdateFellowInfo_CurStar(fellow);
    }
Ejemplo n.º 4
0
    void OnFriendFellowPress()
    {
        if (false == GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.IsValid())
        {
            return;
        }

        Tab_CabalFellowAttr tabFellow = TableManager.GetCabalFellowAttrByID(GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.DataId, 0);

        if (tabFellow == null)
        {
            return;
        }

        Tab_CabalFellowTallentSkill tabTalent = TableManager.GetCabalFellowTallentSkillByID(GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.TalentSkill, 0);

        if (tabTalent == null)
        {
            return;
        }

        m_PartnerAttrWindow.SetActive(true);
        m_PartnerAttrWindow.transform.localPosition = new Vector3(200, 0, 0);

        m_PartnerAttr_HeadIcon.spriteName      = tabFellow.Icon;
        m_PartnerAttr_Quality.spriteName       = FellowTool.GetFellowQualityFrame(GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.Quality);
        m_PartnerAttr_Name.text                = GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.Name;
        m_PartnerAttr_Lucky.text               = GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.Lucky.ToString();
        m_PartnerAttr_Level.text               = GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.Level.ToString();
        m_PartnerAttr_TalentIcon.spriteName    = tabTalent.Icon;
        m_PartnerAttr_TalentQuality.spriteName = FellowTool.GetFellowTallentSkillQualityPic(tabTalent.Id);
        m_PartnerAttr_TalentName.text          = tabTalent.Name;
        m_PartnerAttr_TalentDesc.text          = tabTalent.SkillDesc;
    }
Ejemplo n.º 5
0
 private void SetQuality(Fellow fellow)
 {
     if (m_QualitySprite != null)
     {
         m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
         m_QualitySprite.gameObject.SetActive(true);
     }
 }
Ejemplo n.º 6
0
 void UpdateFellowInfo_Attr(Fellow fellow)
 {
     m_NameLabel.text           = fellow.Name;
     m_IconSprite.spriteName    = fellow.GetIcon();
     m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
     // m_QualityIcon.spriteName = FellowTool.GetFellowQualityIcon(fellow.Quality);
     m_CombatValueLabel.text = fellow.GetCombatValue().ToString();
     m_LevelLabel.text       = fellow.Level.ToString();
     m_ExpLabel.text         = StrDictionary.GetClientDictionaryString("#{10316}", fellow.Exp, fellow.GetFellowLevelUpNeedExp());
 }
Ejemplo n.º 7
0
 public void SetDate(Fellow fellow)
 {
     lblName.text               = fellow.Name;
     lblLv.text                 = fellow.Level.ToString();
     lblPropBreed.text          = fellow.ProcreateCount.ToString();
     lblPropLucky.text          = fellow.Lucky.ToString();
     sprHead.spriteName         = fellow.GetIcon();
     sprQualityFrame.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
     sprQualityStone.spriteName = FellowTool.GetFellowQualityIcon(fellow.Quality);
 }
Ejemplo n.º 8
0
 public void Init(Fellow fellow)
 {
     m_fellow = fellow;
     //m_NameLabel.text = Utils.GetFellowNameColor(fellow.Quality);
     m_NameLabel.text        = fellow.Name;
     m_LevelLabel.text       = fellow.Level.ToString();
     m_IconSprite.spriteName = fellow.GetIcon();
     //m_IconSprite.MakePixelPerfect();
     m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
     m_CombatValueLabel.text    = fellow.GetCombatValue().ToString();
     m_ProCreateLabel.text      = fellow.ProcreateCount.ToString();
     m_LuckyLabel.text          = fellow.Lucky.ToString();
 }
Ejemplo n.º 9
0
    void OnPlayerFellowPress()
    {
        if (m_BabyFellow == null)
        {
            return;
        }

        Tab_CabalFellowTallentSkill tabTalent = null;

        foreach (KeyValuePair <int, int> pair in m_BabyFellow.TallentSkill)
        {
            int skillid = pair.Key;
            if (skillid <= 0)
            {
                return;
            }

            Tab_CabalFellowTallentSkill tabTallentSkill = TableManager.GetCabalFellowTallentSkillByID(skillid, 0);
            if (tabTallentSkill == null)
            {
                return;
            }

            tabTalent = tabTallentSkill;
            break;
        }

        if (tabTalent == null)
        {
            return;
        }

        m_PartnerAttrWindow.SetActive(true);
        m_PartnerAttrWindow.transform.localPosition = new Vector3(-200, 0, 0);

        m_PartnerAttr_HeadIcon.spriteName      = m_BabyFellow.GetIcon();
        m_PartnerAttr_Quality.spriteName       = FellowTool.GetFellowQualityFrame(m_BabyFellow.Quality);
        m_PartnerAttr_Name.text                = m_BabyFellow.Name;
        m_PartnerAttr_Lucky.text               = m_BabyFellow.Lucky.ToString();
        m_PartnerAttr_Level.text               = m_BabyFellow.Level.ToString();
        m_PartnerAttr_TalentIcon.spriteName    = tabTalent.Icon;
        m_PartnerAttr_TalentQuality.spriteName = FellowTool.GetFellowTallentSkillQualityPic(tabTalent.Id);
        m_PartnerAttr_TalentName.text          = tabTalent.Name;
        m_PartnerAttr_TalentDesc.text          = tabTalent.SkillDesc;
    }
Ejemplo n.º 10
0
    public void OnRebirthClick(Fellow fellow)
    {
        if (fellow == null)
        {
            return;
        }

        if (false == fellow.IsValid())
        {
            return;
        }

        Tab_CabalFellowAttr tabAttr = TableManager.GetCabalFellowAttrByID(fellow.DataId, 0);

        if (tabAttr == null)
        {
            return;
        }

        Tab_CabalFellowAttr tabBaby = TableManager.GetCabalFellowAttrByID(tabAttr.BabyFellowId, 0);

        if (tabBaby == null)
        {
            LogModule.ErrorLog("The fellow has not baby state, fellow id = " + fellow.DataId);
            return;
        }

        m_CurFellowIcon.spriteName         = fellow.GetIcon();
        m_CurFellowQualityFrame.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality);
        m_CurFellowNameLabel.text          = fellow.Name;
        m_RebirthFellowIcon.spriteName     = tabBaby.Icon;
        m_RebirthFellowNameLabel.text      = tabBaby.Name;
        m_RebirthItemSlot.InitInfo_Yuanbao(null, GlobeVar.PARTNER_REBIRTH_YUANBAO.ToString(), true);

        m_RebirthWindow.SetActive(true);

        m_FellowBuffer = fellow;
    }