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);
    }
Exemplo n.º 3
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());
 }
Exemplo n.º 4
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);
 }
    public void UpdateFellow_AttrInfo(Fellow fellow)
    {
        m_headPic.spriteName    = fellow.GetIcon();
        m_NameLabel.text        = fellow.Name;
        m_CombatValueLabel.text = fellow.CombatValue.ToString();
        if (fellow.GetFellowType() == (int)FELLOWTYPE.ALIEN)
        {
            m_TypeLabel.text = FellowTool.GetFellowTypeText(fellow.GetFellowType(), fellow.GetEvolveLevel());
        }
        else
        {
            m_TypeLabel.text = FellowTool.GetFellowTypeText(fellow.GetFellowType());
        }
        m_BattleLevelLabel.text = fellow.GetCallLevel().ToString();
        m_LevelLabel.text       = "LV" + fellow.Level.ToString();
        // m_ExpLabel.text = StrDictionary.GetClientDictionaryString("#{10316}", fellow.Exp, fellow.GetFellowLevelUpNeedExp());
        // m_GrowUpLabel.text = fellow.GrowUp.ToString();

        m_AttackLabel.text   = fellow.CombatAttr_Attack.ToString();
        m_HitLabel.text      = fellow.CombatAttr_Hit.ToString();
        m_CriticalLabel.text = fellow.CombatAttr_Critical.ToString();
        m_GuardLabel.text    = fellow.CombatAttr_Guard.ToString();
        m_BlessLabel.text    = fellow.CombatAttr_Bless.ToString();

        if (fellow.GetFellowType() == (int)FELLOWTYPE.BABY)
        {
            m_ProCreateLabel.text = fellow.ProcreateCount.ToString();
            m_LuckyLabel.text     = fellow.Lucky.ToString();
            m_BabyAttr.SetActive(true);
        }
        else
        {
            m_BabyAttr.SetActive(false);
        }

        if (fellow.GetFellowType() == (int)FELLOWTYPE.ADULT || fellow.GetFellowType() == (int)FELLOWTYPE.ALIEN)
        {
            m_ElementPic.spriteName = FellowTool.GetFellowElementPic(fellow.ElementAttr);
            m_ElementAttr.SetActive(true);
        }
        else
        {
            m_ElementAttr.SetActive(false);
        }

        if (fellow.GetFellowType() == (int)FELLOWTYPE.ALIEN)
        {
            m_AlienLabel.text = fellow.GetEvolveLevel().ToString();
            m_AlienAttr.SetActive(true);
        }
        else
        {
            m_AlienAttr.SetActive(false);
        }
    }
 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();
 }
Exemplo n.º 7
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;
    }
Exemplo n.º 8
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;
    }
Exemplo n.º 9
0
 private void SetIcon(Fellow fellow)
 {
     m_IconSprite.spriteName = fellow.GetIcon();
     //m_IconSprite.MakePixelPerfect();
 }
Exemplo n.º 10
0
 private void SetIcon(Fellow fellow)
 {
     m_IconSprite.spriteName = fellow.GetIcon();
     m_IconSprite.gameObject.SetActive(true);
 }