public void playGoddessSound(BeastEvolve chooseItem) { if (chooseItem.getBeast().uid != "") { int audioId = 401 + BeastEvolveManagerment.Instance.getBeastIndexBySid(chooseItem.getBeast().sid); if (audioSource.isPlaying) { stopMusic = true; StartCoroutine(Utils.DelayRun(() => { PlayGoddessMusic(audioId); }, 1f)); } else { StartCoroutine(Utils.DelayRun(() => { PlayGoddessMusic(audioId); }, 1f)); } } else { if (audioSource.isPlaying) { stopMusic = true; } } }
public void initWindowWirte(BeastEvolve selectedEvolv, int id) { beastEvolve = selectedEvolv; flag = true; string iconId = ""; if (CommandConfigManager.Instance.getNvShenClothType() == 0) { iconId = selectedEvolv.getBeast().getImageID() + "c"; } else { iconId = selectedEvolv.getBeast().getImageID() + ""; } ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, iconTexure, (obj) => { flag = true; GameObject frist = null; switch (id) { case 1: break; case 2: break; case 3: descLabel.gameObject.SetActive(false); StartCoroutine(Utils.DelayRun(() => { iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f)); iTween.ShakePosition(this.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f)); }, 0.5f)); StartCoroutine(Utils.DelayRun(() => { NGUITools.AddChild(faObj, openIceObj); }, 1.2f)); StartCoroutine(Utils.DelayRun(() => { bing.gameObject.SetActive(false); }, 2.5f)); StartCoroutine(Utils.DelayRun(() => { MaskWindow.UnlockUI(); }, 2.5f)); break; default: descLabel.text = LanguageConfigManager.Instance.getLanguage("GuideError_02"); MaskWindow.UnlockUI(); break; } }); }
//返回单个前提条件结果 如果为""表示已经完成 否则返回未达成说明文字 public string checkPremise(ExchangePremise premise, BeastEvolve beast) { if (premise.type == PremiseType.LEVEL) { if (UserManager.Instance.self.getUserLevel() < premise._value) { return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099")); } } else if (premise.type == PremiseType.BSID_MAX) { if (beast == null) { return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099")); } else if (beast.getBeast().getLevel() < premise._value) { return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099")); } } else if (premise.type == PremiseType.PARENT) { if (!ExchangeManagerment.Instance.isParentComplete(premise._value)) { return(premise.describe + LanguageConfigManager.Instance.getLanguage("s0099")); } } return(""); }
public void Initialize() { beastList = BeastEvolveManagerment.Instance.getAllBest(); //init item foreach (GoddessContentItem tmp in goddessItems) { BeastEvolve be = null; be = beastList.Find((beast) => { if (beast.getBeast().getImageID() == StringKit.toInt(tmp.gameObject.name)) { return(true); } else { return(false); } }); if (be != null) { //获取头像图标 tmp.fatherWindow = this; tmp.beast = be.getBeast(); if (be.isAllExist()) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.GODDESS_HEAD2 + be.getBeast().getImageID() + "_h", tmp.headIcon); tmp.headIcon.gameObject.SetActive(true); tmp.emptyIcon.gameObject.SetActive(false); tmp.evolutionIcon.gameObject.SetActive(true); tmp.level.gameObject.SetActive(true); tmp.evolutionIcon.spriteName = QualityManagerment.qualityIDToString(be.getBeast().getQualityId()); tmp.evolutionTimes.text = be.getBeast().getQualityId().ToString(); tmp.level.text = "Lv." + be.getBeast().getLevel() + "/" + be.getBeast().getMaxLevel(); //获取品质图标 tmp.qualityIcon.spriteName = QualityManagerment.qualityIDToIconSpriteName(be.getBeast().getQualityId()); } } } rushCombat(); tipsGameObject.SetActive(checkShowTips()); if (GuideManager.Instance.isEqualStep(16003000)) { GuideManager.Instance.guideEvent(); } //尝试执行友善指引 GuideManager.Instance.doFriendlyGuideEvent(); }
public override void DoClickEvent() { base.DoClickEvent(); UiManager.Instance.openWindow <BeastAttrWindow>((win) => { win.Initialize(chooseItem.getBeast(), BeastAttrWindow.RESONANCE); fatherWindow.finishWindow(); }); }
public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj.name == "screenButton") { if (flag && beastEvolve != null) { BeastAttrWindow baw = UiManager.Instance.getWindow <BeastAttrWindow>(); if (baw != null) { baw.Initialize(beastEvolve.getBeast(), BeastAttrWindow.STOREVIEW); baw.UpdateUI(); } finishWindow(); return; } //强制引导召唤女神后直接返回主界面,同事提前清空队伍缓存 if (GuideManager.Instance.guideSid == 16006000) { ArmyManager.Instance.cleanAllEditArmy(); GuideManager.Instance.doGuide(); UiManager.Instance.openMainWindow(); dialogCloseUnlockUI = false; finishWindow(); return; } if (GuideManager.Instance.isDoesNotEqualStep(7001000) && GuideManager.Instance.isDoesNotEqualStep(12001000) && GuideManager.Instance.isDoesNotEqualStep(15001000)) { GuideManager.Instance.doGuide(); } if (GuideManager.Instance.isEqualStep(6004000) || GuideManager.Instance.isEqualStep(11004000) || GuideManager.Instance.isEqualStep(13008000) || GuideManager.Instance.isEqualStep(7001000) || GuideManager.Instance.isEqualStep(12001000) || GuideManager.Instance.isEqualStep(15001000)) { if (fatherWindow is MissionMainWindow) { GameManager.Instance.playAnimationType = 1; (fatherWindow as MissionMainWindow).nvshen(); } } else if (tkflag && fatherWindow is MissionMainWindow) { (fatherWindow as MissionMainWindow).showEffectForHero(true); } else if (!tkflag && fatherWindow is MissionMainWindow) { (fatherWindow as MissionMainWindow).showEffectForHero(false); } finishWindow(); if (UiManager.Instance.getWindow <MissionMainWindow> () != null && UiManager.Instance.getWindow <MissionMainWindow> ().gameObject.activeSelf) { UiManager.Instance.getWindow <MissionMainWindow> ().TweenerGroupIn(); } } }
public override void DoClickEvent() { base.DoClickEvent(); if (gameObject.name == "summon") { UiManager.Instance.openWindow <BeastAttrWindow> ((win) => { if (GuideManager.Instance.isEqualStep(16003000)) { GuideManager.Instance.doGuide(); win.Initialize(chooseItem.getBeast(), BeastAttrWindow.RESONANCE); } else { win.Initialize(chooseItem.getBeast(), BeastAttrWindow.RESONANCE); } }); } else { MaskWindow.UnlockUI(); } }
public void changeButton(bool onOff) { Card beast = summonCardEvo.getBeast(); //如果当前召唤兽 uid==0表示需要召唤 否则是进化 if (beast.uid == "") { summonButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0093"); //beastSummonW11 } else { summonButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("s0093"); //beastSummonW06 } if (onOff == false) { summonButton.disableButton(true); } else { summonButton.disableButton(false); } }
/**显示兑换条件 */ private void updateCondition(BeastEvolve chooseItem) { if (selectedCard.uid == "" && !(fatherWindow is TeamEditWindow)) //召唤 { int index = BeastEvolveManagerment.Instance.getBeastIndexBySid(chooseItem.getBeast().sid) + 1; Horoscopes hores = HoroscopesManager.Instance.getStarByType(index); conditonPoint.SetActive(true); combatPoint.SetActive(false); inofPoint.SetActive(false); //nvshengSprite.spriteName= "horStar"+selectedCard.getTitleName(selectedCard.sid); nvshengLabel.text = hores.getName(); nvshengDayLabel.text = hores.getDate(); nvshengLabel.effectStyle = UILabel.Effect.Outline; nvshengLabel.effectColor = new Color32(0, 1, 0, 255); nvshengLabel.color = new Color32(0, 213, 255, 255); sample = selectedEvolve.getExchangeBySids(selectedEvolve.getNextBeast().sid); foreach (ExchangeCondition each in sample.conditions[0]) { if (each.costType == PrizeType.PRIZE_MONEY) { needMoneyLabel.text = each.num.ToString(); if (UserManager.Instance.self.getMoney() < each.num) { needMoneyLabel.text = Colors.RED + each.num.ToString(); } } else { propButton.updateButton(each, ButtonExchange.BEASTSUMMON); needPropNum = each.num; break; } } } else //进化 { conditonPoint.SetActive(false); combatPoint.SetActive(true); inofPoint.SetActive(true); } }
public void Initialize(BeastEvolve _selectedEvolve, long _exp) { selectedEvolve = _selectedEvolve; exp = _exp; oldCard = selectedEvolve.getBeast(); if (!selectedEvolve.isEndBeast()) { newCard = selectedEvolve.getNextBeast(); newCard.updateExp(oldCard.getEXP()); } else { newCard = oldCard; } showOldInfo(); if (newCard != null) { showNewInfo(); } showCondition(); }
public void updateAll() { if (beastEvo == null) { return; } Card tmpCard = beastEvo.getBeast(); if (tmpCard.uid == "") { //cardImage.color=new Color(0.1f,0.1f,0.1f,1); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.BACKGROUNDPATH + "nvshen_ice", ice_bg); ice_bg.gameObject.SetActive(true); } else { cardImage.color = Color.white; ice_bg.gameObject.SetActive(false); } ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH, beastEvo.getBeast(), cardImage); }
public override void DoClickEvent() { base.DoClickEvent(); if (beast != null) { fatherWindow.finishWindow(); EventDelegate.Add(fatherWindow.OnHide, () => { UiManager.Instance.openWindow <BeastSummonWindow>((win) => { win.Initialize(beast); win.oldCard = beast.getBeast().Clone() as Card; if (!beast.isEndBeast()) { win.newCard = beast.getNextBeast(); win.newCard.updateExp(win.oldCard.getEXP()); } else { win.newCard = win.oldCard; } win.exp = BeastEvolveManagerment.Instance.getHallowExp(); }); }); } }
//进场 private void walkOn(int loction, int intoLoc, string name, int iconId) { talks [loction - 1].image.mainTexture = null; //无图无真相 if (iconId == 0) { talks [loction - 1].image.gameObject.SetActive(false); talks [loction - 1].image.height = 512; talks [loction - 1].image.width = 512; } //玩家 else if (iconId == -1) { talks [loction - 1].image.gameObject.SetActive(true); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + StorageManagerment.Instance.getRole(UserManager.Instance.self.mainCardUid).getImageID(), talks [loction - 1].image); talks [loction - 1].image.height = 512; talks [loction - 1].image.width = 512; } //女神2050-2061 else if (iconId >= 2050 && iconId <= 2061) { BeastEvolveManagerment instance = BeastEvolveManagerment.Instance; int beastIndex = instance.getBeastIndexByImageId(iconId) - 1; BeastEvolve be = instance.getBeastEvolveByIndex(beastIndex); talks [loction - 1].image.gameObject.SetActive(true); if (be != null && be.getBeast().getQualityId() > 1) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c", talks [loction - 1].image); } else { if (CommandConfigManager.Instance.getNvShenClothType() == 0) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c", talks [loction - 1].image); } else { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, talks[loction - 1].image); } } talks [loction - 1].image.height = 1024; talks [loction - 1].image.width = 1024; talks [loction - 1].image.transform.localPosition = new Vector2(35, 200); } //我的星座女神-2 else if (iconId == -2) { talks [loction - 1].image.gameObject.SetActive(true); if (UserManager.Instance.self != null && UserManager.Instance.self.star != 0) { if (CommandConfigManager.Instance.getNvShenClothType() == 0) { ResourcesManager.Instance.LoadAssetBundleTexture( ResourcesManager.CARDIMAGEPATH + HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getImageID() + "c", talks[loction - 1].image); } else { ResourcesManager.Instance.LoadAssetBundleTexture( ResourcesManager.CARDIMAGEPATH + HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getImageID(), talks[loction - 1].image); } } else { if (CommandConfigManager.Instance.getNvShenClothType() == 0) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId + "c", talks[loction - 1].image); } else { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, talks[loction - 1].image); } } talks [loction - 1].image.height = 1024; talks [loction - 1].image.width = 1024; talks [loction - 1].image.transform.localPosition = new Vector2(35, 200); } else { talks [loction - 1].image.gameObject.SetActive(true); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + iconId, talks [loction - 1].image); talks [loction - 1].image.height = 512; talks [loction - 1].image.width = 512; } location [loction - 1] = 1; talkerNames [loction - 1] = name; talks [loction - 1].talkIn(intoLoc); if (iconId == -1) //玩家 { talks [loction - 1].talkerName.text = getName(name); } else if (iconId >= 2050 && iconId <= 2061) //女神 { talks [loction - 1].talkerName.text = HoroscopesManager.Instance.getStarByType(BeastEvolveManagerment.Instance.getBeastIndexByImageId(iconId)).getName() + LanguageConfigManager.Instance.getLanguage("goddess"); } else if (iconId == -2) //我的星座女神-2 { if (UserManager.Instance.self != null && UserManager.Instance.self.star != 0) { talks [loction - 1].talkerName.text = HoroscopesManager.Instance.getStarByType(UserManager.Instance.self.star).getName() + LanguageConfigManager.Instance.getLanguage("goddess"); } else { talks [loction - 1].talkerName.text = name; } } else { talks [loction - 1].talkerName.text = name; } StartCoroutine("printer", 0); activeTalk = talks [loction - 1]; }
public void showUI() { switch (tapType) { case 0: if (info.isUse == 0) { useSprite.alpha = 0; } else { useSprite.alpha = 1; useSprite.spriteName = "text_share"; } showItem.GetComponent <BoxCollider>().enabled = false; string sidOne = ""; if (showType != FriendsShareManagerment.TYPE_JINHUA) { sidOne = info.sid.getValueString(); } switch (showType) { case FriendsShareManagerment.TYPE_CARD: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; Card card = CardManagerment.Instance.createCard(StringKit.toInt(sidOne)); string quilityCard = QualityManagerment.getQualityName(card.getQualityId()) + "[-]"; string nameCard = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilityCard, nameCard); break; case FriendsShareManagerment.TYPE_EQUIP: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; Equip equip = EquipManagerment.Instance.createEquip(StringKit.toInt(sidOne)); string quilityEquip = QualityManagerment.getQualityName(equip.getQualityId()) + "[-]"; string nameEquip = QualityManagerment.getQualityColor(equip.getQualityId()) + equip.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilityEquip, nameEquip); break; case FriendsShareManagerment.TYPE_MAGICWEAPON: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; MagicWeapon mw = MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidOne)); string quilitymw = QualityManagerment.getQualityName(mw.getMagicWeaponQuality()) + "[-]"; string namemw = QualityManagerment.getQualityColor(mw.getMagicWeaponQuality()) + mw.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, quilitymw, namemw); break; case FriendsShareManagerment.TYPE_XIULIAN: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_TAOFA: Mission mss = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidOne)); showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, mss.getMissionName()); break; case FriendsShareManagerment.TYPE_JUQING: Mission mssJq = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidOne)); ChapterSample chapterJq = ChapterSampleManager.Instance.getChapterSampleBySid(mssJq.getChapterSid()); showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, chapterJq.name); break; case FriendsShareManagerment.TYPE_PVP: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_SHENGQI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_XINGPAN: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_JINHUA: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; // Card cardJinhua = CardManagerment.Instance.createCard(StringKit.toInt(sid)); ServerCardMsg cardServer = CardManagerment.Instance.createCardByChatServer(info.sid as ErlArray); string nameCardJinhua = QualityManagerment.getQualityColor(cardServer.card.getQualityId()) + cardServer.card.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, nameCardJinhua); break; case FriendsShareManagerment.TYPE_SHENGJI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_NVSHEN: Card cardNvshen = CardManagerment.Instance.createCard(StringKit.toInt(sidOne)); string nvshenName = QualityManagerment.getQualityColor(cardNvshen.getQualityId()) + cardNvshen.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, nvshenName); break; case FriendsShareManagerment.TYPE_TUPO: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType); break; case FriendsShareManagerment.TYPE_YXZHIZHANG: MissionSample mission = MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidOne)); ChapterSample chsam = ChapterSampleManager.Instance.getChapterSampleBySid(mission.chapterSid); int gc = StringKit.toInt(sidOne) - chsam.missions[0] + 1; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, mission.name, gc.ToString()); break; case FriendsShareManagerment.TYPE_JWTISHENG: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, KnighthoodConfigManager.Instance.getKnighthoodByGrade(StringKit.toInt(info.sid.getValueString().ToString())).kName); break; case FriendsShareManagerment.TYPE_XINGHUN: StarSoulSample sample = StarSoulSampleManager.Instance.getStarSoulSampleBySid(StringKit.toInt(sidOne)); string sampleName = QualityManagerment.getQualityColor(sample.qualityId) + sample.name + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sampleName); break; case FriendsShareManagerment.TYPE_ZUOQI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, MountsManagerment.Instance.createMounts(StringKit.toInt(sidOne)).getName()); break; case FriendsShareManagerment.TYPE_VIP: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, UserManager.Instance.self.nickname, sidOne); break; case FriendsShareManagerment.TYPE_LADDER: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_ARENA: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; case FriendsShareManagerment.TYPE_JINGCAI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType); break; case FriendsShareManagerment.TYPE_BEAST: //showItem.GetComponent<BoxCollider>().enabled = true; //showItem.info = info; BeastEvolve beast = BeastEvolveManagerment.Instance.getBeastEvolveBySid(StringKit.toInt(sidOne)); string beastName = QualityManagerment.getQualityColor(beast.getBeast().getQualityId()) + beast.getBeast().getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, beastName); break; case FriendsShareManagerment.TYPE_QISHU: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_Mine" + showType, sidOne); break; } break; case 1: CardSample cs; if (info.isUse == 0) { useSprite.alpha = 0; } else { useSprite.alpha = 1; useSprite.spriteName = "text_applaud"; } string name = info.name; string vip1 = info.vip; string vip = ""; if (vip1 == "0") { vip = ""; } else { vip = "<VIP" + vip1 + ">"; } DateTime dt = TimeKit.getDateTime(StringKit.toInt(info.time)); string time = "[" + dt.Hour + ":" + dt.Minute + "]"; showItem.GetComponent <BoxCollider>().enabled = false; string sidTwo = ""; if (showType != FriendsShareManagerment.TYPE_JINHUA) { sidTwo = info.sid.getValueString(); } switch (info.type) { case FriendsShareManagerment.TYPE_CARD: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; cs = CardSampleManager.Instance.getRoleSampleBySid(StringKit.toInt(sidTwo)); if (cs == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo); break; } else { Card card = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo)); string quilityCard = QualityManagerment.getQualityName(card.getQualityId()) + "[-]"; string nameCard = QualityManagerment.getQualityColor(card.getQualityId()) + card.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, quilityCard, nameCard); break; } case FriendsShareManagerment.TYPE_EQUIP: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; if (EquipmentSampleManager.Instance.getEquipSampleBySid(StringKit.toInt(sidTwo)) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo); break; } else { Equip equip = EquipManagerment.Instance.createEquip(StringKit.toInt(sidTwo)); string quilityEquip = QualityManagerment.getQualityName(equip.getQualityId()) + "[-]"; string nameEquip = QualityManagerment.getQualityColor(equip.getQualityId()) + equip.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, quilityEquip, nameEquip); break; } case FriendsShareManagerment.TYPE_MAGICWEAPON: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; if (MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidTwo)) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, "[-]", sidTwo); break; } else { MagicWeapon equip = MagicWeaponManagerment.Instance.createMagicWeapon(StringKit.toInt(sidTwo)); string quilityMagic = QualityManagerment.getQualityName(equip.getMagicWeaponQuality()) + "[-]"; string nameMagic = QualityManagerment.getQualityColor(equip.getMagicWeaponQuality()) + equip.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, time, quilityMagic, nameMagic); break; } case FriendsShareManagerment.TYPE_XIULIAN: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo); break; case FriendsShareManagerment.TYPE_TAOFA: if (MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo)) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo); break; } else { Mission mss = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidTwo)); showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, mss.getMissionName()); break; } case FriendsShareManagerment.TYPE_JUQING: if (MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo)) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo); break; } else { Mission mssJuqing = MissionInfoManager.Instance.getMissionBySid(StringKit.toInt(sidTwo)); if (ChapterSampleManager.Instance.getChapterSampleBySid(mssJuqing.getChapterSid()) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, time, sidTwo); break; } else { ChapterSample chapterJq = ChapterSampleManager.Instance.getChapterSampleBySid(mssJuqing.getChapterSid()); showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, chapterJq.name); break; } } case FriendsShareManagerment.TYPE_PVP: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; case FriendsShareManagerment.TYPE_SHENGQI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; case FriendsShareManagerment.TYPE_XINGPAN: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; case FriendsShareManagerment.TYPE_JINHUA: showItem.GetComponent <BoxCollider>().enabled = true; showItem.info = info; // Card cardJinhua = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo)); ServerCardMsg cardServer = CardManagerment.Instance.createCardByChatServer(info.sid as ErlArray); string nameCardJinhua = QualityManagerment.getQualityColor(cardServer.card.getQualityId()) + cardServer.card.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, nameCardJinhua); break; case FriendsShareManagerment.TYPE_SHENGJI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; case FriendsShareManagerment.TYPE_NVSHEN: cs = CardSampleManager.Instance.getRoleSampleBySid(StringKit.toInt(sidTwo)); if (cs == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; } else { Card cardNvshen = CardManagerment.Instance.createCard(StringKit.toInt(sidTwo)); string nvshenName = QualityManagerment.getQualityColor(cardNvshen.getQualityId()) + cardNvshen.getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, nvshenName); break; } case FriendsShareManagerment.TYPE_TUPO: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip); break; case FriendsShareManagerment.TYPE_YXZHIZHANG: MissionSample mission = MissionSampleManager.Instance.getMissionSampleBySid(StringKit.toInt(sidTwo)); if (mission == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo, sidTwo); break; } ChapterSample chsam = ChapterSampleManager.Instance.getChapterSampleBySid(mission.chapterSid); if (chsam == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, mission.name, sidTwo); break; } int gc = StringKit.toInt(sidTwo) - chsam.missions[0] + 1; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, mission.name, gc.ToString()); break; case FriendsShareManagerment.TYPE_JWTISHENG: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip); break; case FriendsShareManagerment.TYPE_XINGHUN: StarSoulSample sample = StarSoulSampleManager.Instance.getStarSoulSampleBySid(StringKit.toInt(sidTwo)); string sampleName = QualityManagerment.getQualityColor(sample.qualityId) + sample.name + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sampleName); break; case FriendsShareManagerment.TYPE_ZUOQI: if (MountsSampleManager.Instance.getMountsSampleBySid(StringKit.toInt(sidTwo)) == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; } showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, MountsManagerment.Instance.createMounts(StringKit.toInt(sidTwo)).getName()); break; case FriendsShareManagerment.TYPE_VIP: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip); break; case FriendsShareManagerment.TYPE_LADDER: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip); break; case FriendsShareManagerment.TYPE_ARENA: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; case FriendsShareManagerment.TYPE_JINGCAI: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip); break; case FriendsShareManagerment.TYPE_BEAST: BeastEvolve beast = BeastEvolveManagerment.Instance.getBeastEvolveBySid(StringKit.toInt(sidTwo)); if (beast == null) { showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; } string beastName = QualityManagerment.getQualityColor(beast.getBeast().getQualityId()) + beast.getBeast().getName() + "[-]"; showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, beastName); break; case FriendsShareManagerment.TYPE_QISHU: showLabel.text = LanguageConfigManager.Instance.getLanguage("Share_F" + showType, name, vip, sidTwo); break; } break; } }
private void setDecForInfo(Award award) { if (award == null) { return; } //CharacterData tempGuardianForce = BattleManager.battleData.playerTeamInfo.guardianForce;//召唤兽 int cardExp = 0; int beastExp = 0; string beastExpDesc = ""; if (award.exps != null) { if (BattleManager.battleData.playerTeamInfo.guardianForce != null) { for (int i = 0; i < award.exps.Count; i++) { if (BattleManager.battleData.playerTeamInfo.guardianForce.uid == award.exps[i].id) { BeastEvolve tmp = BeastEvolveManagerment.Instance.getBeastEvolveBySid( BattleManager.battleData.playerTeamInfo.guardianForce.sid); if (!tmp.getBeast().isMaxLevel()) { beastExp = award.exps[i].expGap; } else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() != 125) { beastExpDesc = LanguageConfigManager.Instance.getLanguage("Evo19"); } else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() == 125) { beastExpDesc = LanguageConfigManager.Instance.getLanguage("Evo20"); } } else if (cardExp == 0 && award.exps[i].expGap > 0) { cardExp = award.exps[i].expGap; } } } else { for (int i = 0; i < award.exps.Count; i++) { if (cardExp == 0 && award.exps[i].expGap > 0) { cardExp = award.exps[i].expGap; } } //cardExp = award.exps[0].expGap; } } if (cardExp != 0) { float expAdd = 0; expAdd += GuildManagerment.Instance.getSkillAddExpPorCardPve() * 0.01f; if (UserManager.Instance.self.getVipLevel() > 0) { expAdd += VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd * 0.0001f; } if (ServerTimeKit.getSecondTime() < BackPrizeLoginInfo.Instance.endTimes) // 双倍经验期间// { careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee", cardExp + "", 2 + expAdd + ""); //LanguageConfigManager.Instance.getLanguage("EXPADD") + (2 + expAdd); } else { if (expAdd == 0) { careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gave", cardExp + ""); } else { careDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee", cardExp + "", 1 + expAdd + ""); } } } if (beastExp != 0) { float expA = 0; expA += GuildManagerment.Instance.getSkillAddExpPorBeastPve() * 0.01f; if (UserManager.Instance.self.getVipLevel() > 0) { expA = VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd * 0.0001f; } if (ServerTimeKit.getSecondTime() < BackPrizeLoginInfo.Instance.endTimes) // 双倍经验期间// { beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv1", beastExp + "", 2 + expA + ""); //LanguageConfigManager.Instance.getLanguage("EXPADD") + (2 + expAdd); } else { if (expA == 0) { beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv", beastExp + ""); } else { beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nv1", beastExp + "", 1 + expA + ""); } } } else { if (BattleManager.battleData.playerTeamInfo.guardianForce == null) { beastDec = ""; } else { beastDec = LanguageConfigManager.Instance.getLanguage("Award_exp_gavee_nvShen", beastExpDesc); } } }
public void updateSelectedCard(BeastEvolve evo) { selectedEvolve = evo; selectedCard = selectedEvolve.getBeast(); }
/// <summary> /// 初始化信息 /// </summary> /// <param name="_type">1卡片 2女神.</param> /// <param name="target">Target.</param> /// <param name="_newExp">_new exp.</param> /// <param name="_lv">_lv.</param> /// <param name="_combat">_combat.</param> public void init(int _type, CharacterCtrl target, int _newExp, int _lv, int _combat) { cardtype = _type; expAdd = 0; character = target; vipExpMax = _newExp; lv = _lv; combat = _combat; if (_type == TYPE_CARD) { expAdd += GuildManagerment.Instance.getSkillAddExpPorCardPve() * 0.01f; } else if (_type == TYPE_BEAST) { expAdd += GuildManagerment.Instance.getSkillAddExpPorBeastPve() * 0.01f; } if (UserManager.Instance.self.getVipLevel() > 0) { expAdd += VipManagerment.Instance.getVipbyLevel(UserManager.Instance.self.getVipLevel()).privilege.expAdd * 0.0001f; expMax = (int)((float)_newExp / (1 + expAdd)); stepVip = (int)((float)(_newExp - expMax) / (TextTime * 53)); if (stepVip < 1) { stepVip = 1; } } else { expMax = vipExpMax; } step = (int)((float)expMax / (TextTime * 53)); if (step < 1) { step = 1; } if (expMax == 0) { Card tmpCard = character.characterData.role; //达到自身等级上限(非主角等级限制)且未进化满10次的卡片在获得经验时飘字: 需进化 if (tmpCard != null && !EvolutionManagerment.Instance.isMaxEvoLevel(tmpCard) && tmpCard.isMaxLevel()) { label.text = LanguageConfigManager.Instance.getLanguage("Evo19"); } //如果卡片确实已经达到了进化10次的上限,则飘字提示 已满级 else if (tmpCard != null && EvolutionManagerment.Instance.isMaxEvoLevel(tmpCard) && tmpCard.isMaxLevel()) { label.text = LanguageConfigManager.Instance.getLanguage("Evo20"); } else if (tmpCard != null && cardtype == TYPE_BEAST) { BeastEvolve tmp = BeastEvolveManagerment.Instance.getBeastEvolveBySid(tmpCard.sid);//StorageManagerment.Instance.getBeast(tmpCard.uid); if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() == 125) { label.text = LanguageConfigManager.Instance.getLanguage("Evo20"); } else if (tmp.getBeast().isMaxLevel() && tmp.getBeast().getLevel() != 125) { label.text = LanguageConfigManager.Instance.getLanguage("Evo19"); } } } }