private static bool FellowStatesAreCompatible(Fellow master, Fellow slave) { return (master.State == MessagingFloomeen.State.Retrying && slave.State == FlipperFloomeen.State.Unchanged); }
void UpdateFellowInfo_ElementSkill(Fellow fellow) { for (int i = 0; i < m_ElementSkill.Length && i < Fellow.FELLOW_ELEMENTSKILL_COUNT && i < Fellow.FELLOW_ELEMENTSKILL_OPENCOUNT; i++) { m_ElementSkill[i].InitElementSkill_Hold(fellow.GetElementSkillId(i), i, fellow.Level); } }
void OnPartnerChooseCancelClick() { m_BabyFellowBuffer = null; m_FellowIndexBuffer = 0; m_PartnerChooseWindow.SetActive(false); }
/// <summary> /// 选择好宝宝 /// </summary> public void OnPartnerChooseOKClick(Fellow fellow) { m_BabyFellowBuffer = fellow; if (m_BabyFellowBuffer.ProcreateCount <= 0) { GUIData.AddNotifyData("#{10337}"); return; } if (m_BabyFellowBuffer.Called) { GUIData.AddNotifyData("#{10344}"); return; } m_BabyFellow = m_BabyFellowBuffer; m_FellowIndex = m_FellowIndexBuffer; UpdateChooseFellowModel(); m_PartnerChooseWindow.SetActive(false); m_PushPartnerButton.SetActive(false); m_PlayerTips.SetActive(false); m_OpButtons.SetActive(true); m_LookForBreedingButton.GetComponent <UIImageButton>().isEnabled = true; }
/// <summary> /// 天赋技能 /// </summary> /// <param name="fellow"></param> void UpdateFellowInfo_TalentSkill(Fellow fellow) { int i = 0; foreach (KeyValuePair <int, int> pair in fellow.TallentSkill) { if (pair.Key != GlobeVar.INVALID_ID) { if (i < m_TalentSkill.Length && i < Fellow.FELLOW_TALLENTSKILL_COUNT && i < Fellow.FELLOW_TALLENTSKILL_OPENCOUNT) { m_TalentSkill[i].gameObject.SetActive(true); m_TalentSkill[i].InitTallentSkill(pair.Key, pair.Value); i++; } else { break; } } } for (; i < m_TalentSkill.Length; i++) { m_TalentSkill[i].gameObject.SetActive(false); } UIGrid grid = m_TalentSkill[0].GetComponentInParent <UIGrid>(); if (grid != null) { grid.Reposition(); } }
void OnClickCloseChangeName() { m_ChangeNameWindow.SetActive(false); m_ChangeNameInput.value = ""; m_FellowBuffer = null; }
public void UpdateFellowInfo(Fellow fellow) { if (fellow == null) { return; } if (fellow.IsValid() == false) { return; } m_LevelUpSkillChooseBuffer = GlobeVar.INVALID_ID; m_SkillInfo.SetActive(true); m_SkillChooseWindow.SetActive(false); m_LevelUpWindowType = LEVELUP_WINDOWTYPE.TYPE_INVALID; UpdateFellowInfo_TalentSkill(fellow); UpdateFellowInfo_ElementSkill(fellow); m_Fellow = fellow; if (sendPackageCallback != null) { sendPackageCallback(); sendPackageCallback = null; } }
private void SetQuality(Fellow fellow) { if (m_QualitySprite != null) { m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality); } }
public void UpdateFellowInfo(Fellow fellow, bool bState = true) //bState true 出战 false 召回 { if (fellow == null) { return; } if (fellow.IsValid() == false) { return; } cloningArea.SetActive(false); normalArea.SetActive(true); UpdateFellowInfo_Attr(fellow); UpdateFellowInfo_Star(fellow); UpdateFellowInfo_Skill(fellow); if (bState) { UpdateFellowInfo_Model(fellow); } UpdateFellowInfo_Button(fellow); m_Fellow = fellow; }
void UpdateFellowInfo_Attr(Fellow fellow) { m_NameLabel.text = fellow.Name; m_CombatValueLabel.text = fellow.GetCombatValue().ToString(); m_TypeLabel.text = FellowTool.GetFellowTypeText(fellow.GetFellowType(), fellow.GetEvolveLevel()); m_BattleLevelLabel.text = fellow.GetCallLevel().ToString(); m_LevelLabel.text = fellow.Level.ToString(); m_ExpLabel.text = StrDictionary.GetClientDictionaryString("#{10316}", fellow.Exp, fellow.GetFellowLevelUpNeedExp()); //m_GrowUpLabel.text = fellow.GrowUp.ToString(); m_AttackLabel.text = fellow.GetAttackValue().ToString(); m_HitLabel.text = fellow.GetHitValue().ToString(); m_CriticalLabel.text = fellow.GetCriticalValue().ToString(); m_GuardLabel.text = fellow.GetGuardValue().ToString(); m_BlessLabel.text = fellow.GetBlessValue().ToString(); if (fellow.GetFellowType() == (int)FELLOWTYPE.BABY) { m_ProCreateLabel.text = fellow.ProcreateCount.ToString(); m_LuckyLabel.text = fellow.Lucky.ToString(); m_BabyAttr.SetActive(true); m_SkillArea.SetActive(false); } else { m_BabyAttr.SetActive(false); m_SkillArea.SetActive(true); } m_ElementPic.spriteName = FellowTool.GetFellowElementPic(fellow.ElementAttr); // m_QualityIcon.spriteName = FellowTool.GetFellowQualityIcon(fellow.Quality); }
public void OnFellowClick(Fellow fellow) { m_clickFellow = fellow; if (fellow == null) { // cloning item if (m_CurTab == TABCONTENT.TABCONTENT_INFO) { if (m_PartnerFrameLogic_Info != null) { m_PartnerFrameLogic_Info.ShowCloningTips(); } mCurFellowId = GlobeVar.INVALID_GUID; PartnerFrameItemLogic[] bItem = m_PartnerListGrid.GetComponentsInChildren <PartnerFrameItemLogic>(); for (int i = 0; i < bItem.Length; ++i) { bItem[i].UpdateChooseFlag(mCurFellowId); } } return; } if (false == fellow.IsValid()) { return; } mCurFellowId = fellow.Guid; PartnerFrameItemLogic[] aItem = m_PartnerListGrid.GetComponentsInChildren <PartnerFrameItemLogic>(); for (int i = 0; i < aItem.Length; ++i) { aItem[i].UpdateChooseFlag(fellow.Guid); } if (m_CurTab == TABCONTENT.TABCONTENT_INFO) { if (m_PartnerFrameLogic_Info != null) { m_PartnerFrameLogic_Info.UpdateFellowInfo(fellow); if (fellow.GetFellowType() == (int)FELLOWTYPE.BABY && GameManager.gameManager.MissionManager.IsHaveMission(MISSION_ID_BABY_UPGRADE)) { NewPlayerGuide(21); } } } else if (m_CurTab == TABCONTENT.TABCONTENT_DEVELOP) { if (m_PartnerFrameLogic_Develop != null) { m_PartnerFrameLogic_Develop.UpdateFellowInfo(fellow); } } else if (m_CurTab == TABCONTENT.TABCONTENT_SKILL) { if (m_PartnerFrameLogic_Skill != null) { m_PartnerFrameLogic_Skill.UpdateFellowInfo(fellow); } } OnItemClick(fellow); }
void UpdateFellowInfo_Star(Fellow fellow) { if (fellow.GetFellowType() == (int)FELLOWTYPE.BABY) { m_StarAttr.SetActive(false); m_BabyFellowNotice.SetActive(true); //MoveButtonFun(true); } else { m_StarAttr.SetActive(true); m_BabyFellowNotice.SetActive(false); //MoveButtonFun(false); int nStarCount = fellow.StarLevel > 0 ? ((fellow.StarLevel - 1) % 12) + 1 : 0; for (int i = 0; i < m_StarPic.Length; i++) { if (i < nStarCount) { //m_StarPic[i].spriteName = FellowTool.GetChatFellowStarQualityPic(fellow.StarLevel); //m_StarPic[i].MakePixelPerfect(); // m_StarPic[i].gameObject.SetActive(true); m_StarPic[i].color = ItemTool.GetStarColorRGB(fellow.StarLevel); } else { // m_StarPic[i].gameObject.SetActive(false); m_StarPic[i].color = ItemTool.GetStarColorRGB(fellow.StarLevel - 12); } } } }
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); }
void UpdateFellowInfo_NextStar(Fellow fellow, int addExp) { int nNewStarExp = fellow.StarExp + addExp; // int nTotalStarExp = nNewStarExp; int addLevel = FellowTool.GetFellowAddStarLevel(fellow.StarLevel, nNewStarExp); // int nNewStarLevel = fellow.StarLevel + addLevel; if (fellow.GetCurStarExpMax() > 0) { //m_MaterialPartnerExpLabel.text = nNewStarExp.ToString() + "/" + fellow.GetCurStarExpMax(); m_MaterialPartnerExpSprite.fillAmount = (float)nNewStarExp / (float)fellow.GetCurStarExpMax(); } else { //m_MaterialPartnerExpLabel.text = ""; m_MaterialPartnerExpSprite.fillAmount = 0; } if (addLevel > 0) { m_MaterialPartnerExpCount.gameObject.SetActive(true); m_MaterialPartnerExpCount.text = "x" + addLevel.ToString(); } else { m_MaterialPartnerExpCount.gameObject.SetActive(false); } }
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; }
private void SetQuality(Fellow fellow) { if (m_QualitySprite != null) { m_QualitySprite.spriteName = FellowTool.GetFellowQualityFrame(fellow.Quality); m_QualitySprite.gameObject.SetActive(true); } }
void OnDisable() { m_Instance = null; m_Fellow = null; DestroyPartnerFakeObj(); GameManager.gameManager.ActiveScene.HideFakeObj(); }
public void SetMyFellow(Fellow fellow) { m_fellow = fellow; if (m_fellow != null) { UpdateFellowInfo(m_fellow); } }
public void Init(Fellow fellow) { m_fellow = fellow; m_StarExp = fellow.GetFullStarExp(); SetIcon(fellow); SetQuality(fellow); m_SelectMark.SetActive(false); UIEventListener.Get(gameObject).onClick = OnAddMaterialButtonClick; }
public static FellowshipUpdate read(BinaryReader binaryReader) { FellowshipUpdate newObj = new FellowshipUpdate(); newObj.i_iidPlayer = binaryReader.ReadUInt32(); newObj.fellow = Fellow.read(binaryReader); newObj.i_uiUpdateType = binaryReader.ReadUInt32(); return(newObj); }
public uint Execute(PacketDistributed ipacket) { GC_CALL_FELLOW_RET packet = (GC_CALL_FELLOW_RET)ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } UInt64 fellowGuid = packet.Guid; int fellowObjId = packet.Objid; if (fellowGuid == GlobeVar.INVALID_GUID) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer; if (container != null) { Fellow fellow = container.GetFellowByGuid(fellowGuid); if (fellow != null) { //设置为召出 fellow.Called = true; if (PartnerFrameLogic.Instance() != null) { if (PartnerFrameLogic_Info.Instance() != null) { PartnerFrameLogic_Info.Instance().UpdateFellowInfo(fellow, false); } if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 1) { if (MenuBarLogic.Instance()) { //MenuBarLogic.Instance().NewPlayerGuide(101); } //PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step = -1; } //UIManager.CloseUI(UIInfo.PartnerFrameRoot); } } } Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjId = fellowObjId; Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjGuid = fellowGuid; //播放召出特效 GameManager.gameManager.PlayerDataPool.FellowPlayerEffect = true; //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
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); }
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()); }
void OnDisable() { m_Instance = null; m_Fellow = null; Utils.CleanGrid(m_ChooseMaterialGrid); Utils.CleanGrid(m_MaterialPartnerGrid); m_ChoosePartnerGuid.Clear(); m_ChoosePartnerExp = 0; }
void OnDisable() { m_Instance = null; m_Fellow = null; m_LevelUpTalentSkillChooseBuffer = GlobeVar.INVALID_ID; m_TalentSkillBookBuffer.Clear(); m_LevelUpSkillChooseBuffer = GlobeVar.INVALID_ID; m_LearnSkillChooseBuffer = GlobeVar.INVALID_ID; }
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); } }
private void SetLock(Fellow fellow) { if (fellow.Locked) { m_LockSprite.gameObject.SetActive(true); } else { m_LockSprite.gameObject.SetActive(false); } }
void OnRebirthCancelClick() { m_RebirthWindow.SetActive(false); m_CurFellowIcon.spriteName = ""; m_CurFellowNameLabel.text = ""; m_RebirthFellowIcon.spriteName = ""; m_RebirthFellowNameLabel.text = ""; m_RebirthItemSlot.ClearInfo(); m_FellowBuffer = null; }
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(); }
void UpdateFellowInfo_Star(Fellow fellow) { if (fellow.GetFellowType() == (int)FELLOWTYPE.BABY) { m_StarAttr.SetActive(false); } else { TooltipsEquipStar star = m_StarAttr.GetComponent <TooltipsEquipStar>(); star.ShowStar(fellow.StarLevel); m_StarAttr.SetActive(true); } }