public void initRune(GDERuneData rune) { if (rune == null || rune.Hashcode <= 0) { isEmpty = true; hashcode = 0; id = string.Empty; exp = 0; return; } isEmpty = false; if (upText) { upText.text = SDGameManager.T("Lv.") + rune.level; } hashcode = rune.Hashcode; id = rune.id; // RuneItem item = SDDataManager.Instance.getRuneItemById(id); if (frameImg) { frameImg.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(item.Quality); } if (bgImg) { bgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(item.Quality); } if (itemImg) { //itemImg.sprite } }
public void AddHeroInSlot(int hashcode) { if (isLocked) { return; } GDEHeroData data = SDDataManager.Instance.GetHeroOwnedByHashcode(hashcode); if (data == null) { return; } HeroInfo info = SDDataManager.Instance.getHeroInfoById(data.id); if (info == null) { return; } // isEmpty = false; Icon.sprite = info.FaceIcon; bgIcon.sprite = SDDataManager.Instance.baseBgSpriteByRarity(info.Rarity); frameIcon.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(info.Rarity); // starVision?.gameObject.SetActive(true); starVision.StarNum = data.starNumUpgradeTimes + info.LEVEL; aboveText.text = SDGameManager.T("Lv.") + SDDataManager.Instance.getLevelByExp(data.exp); belowText?.gameObject.SetActive(false); // ItemType = SDConstants.ItemType.Hero; _id = info.ID; _hashcode = data.hashCode; }
public void initDetailPanel(GDERuneData rune) { RuneItem R = SDDataManager.Instance.getRuneItemById(rune.id); ownerId = rune.ownerId; locked = rune.locked; id = rune.id; hashcode = rune.Hashcode; if (itemNameText) { itemNameText.text = R.NAME; } if (itemDescText) { itemDescText.text = R.DESC; } quality = R.Quality; level = rune.level; if (itemExtraText) { itemExtraText.text = SDGameManager.T("Lv.") + level; } //starVision.StarNum = quality; //itemImg = frameImg.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(quality); bgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(quality); }
public void refreshSkillDetail() { #region allSkills if (currentSkill != null) { SkillFunction function = HDP.skillDetailList.AllSkillList[currentSkill.SkillFunctionID] .GetComponent <SkillFunction>(); if (currentSkill.UseAppointedPrefab) { function = currentSkill.SkillPrefab.GetComponent <SkillFunction>(); } // skill_limit.text = SDGameManager.T (currentSkill.isOmegaSkill ? "绝招" : "普通"); skill_name.text = currentSkill.SkillName + "·Lv " + currentSkill.lv; skill_basedata.text = (function.CritR != 0 ? string.Format("基础暴击修正 {0:D}", function.CritR) : "") + (function.AccuracyR != 0 ? string.Format("·基础精度修正 {0:D}", function.AccuracyR) : "") + (function.ExpectR != 0 ? string.Format("·基础期望修正 {0:D}", function.ExpectR) : ""); skill_desc.text = currentSkill.Desc; } #endregion #region equipedSkills heroDetail.readHeroSkills(); #endregion }
public void RefreshWakeUpPanel() { HeroInfo info = SDDataManager.Instance.getHeroInfoById(HeroDetail.ID); HeroRace hrace = info.Race; RaceIcon.sprite = hrace.Icon; RaceIcon.SetNativeSize(); RaceText.text = SDGameManager.T(hrace.NAME); // RoleCareer rcareer = info.Career; CareerIcon.sprite = rcareer.Icon; CareerIcon.SetNativeSize(); CareerText.text = SDGameManager.T(rcareer.NAME); // RarityImg.sprite = SDDataManager.Instance.raritySprite(info.Rarity); RarityImg.SetNativeSize(); if (info.PersonalDrawImg == null) { PoseImg.gameObject.SetActive(false); PoseBgImg.sprite = SDDataManager.Instance.heroRaceBgIcon(hrace.Race); } else { PoseImg.gameObject.SetActive(true); } }
public void showFailHintText() { int rand = Random.Range(0, 30); string txt = SDGameManager.T("LOADING_HINT_TEXT_" + (rand + 1)); loadingText.DOText(txt, 0.1f); }
public void initGoddess(GDEgoddessData goddess) { type = SDConstants.ItemType.Goddess; itemId = goddess.id; //RoGoddessData g = SDDataManager.Instance.getGoddessData(goddess); GoddessInfo g = SDDataManager.Instance.getGoddessInfoById(goddess.id); //itemHashcode = goddess.GetHashCode(); upText.gameObject.SetActive(true); upText.text = SDGameManager.T("Lv.") + SDDataManager.Instance.getLevelByExp(goddess.exp); starVision.StarNum = goddess.star; downText.text = SDGameManager.T(g.name); // itemNum = goddess.volume; SelectTeamUnitPanel STUP = GetComponentInParent <SelectTeamUnitPanel>(); if (STUP) { string cid = STUP.CurrentTeamId; GDEunitTeamData team = SDDataManager.Instance.getHeroTeamByTeamId(cid); if (team.goddess == itemId) { isSelected = true; } else { isSelected = false; } } }
public void initEquip(GDEEquipmentData equip) { SetSelfAsBg(false); EquipItem item = SDDataManager.Instance.GetEquipItemById(equip.id); equipPos = (EquipPosition)SDDataManager.Instance.getEquipPosById(equip.id); itemId = equip.id; // itemImg.sprite = SDDataManager.Instance.GetEquipIconById(itemId); int rarity = item.LEVEL; frameImg.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(rarity); itemBgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(rarity); // itemHashcode = equip.hashcode; itemUpLv = equip.lv; if (starVision) { starVision.gameObject.SetActive(false); } if (downText) { downText.text = SDGameManager.T(item.NAME); } if (upText) { upText.gameObject.SetActive(true); upText.text = SDDataManager.Instance.rarityString(item.LEVEL); } }
public void initBuildingLinkCard(string id) { BuildingId = id; BasicSubMenuPanel P = null; for (int i = 0; i < MCP.homeScene.AllSubMenus.Length; i++) { if (MCP.homeScene.AllSubMenus[i] == null) { continue; } P = MCP.homeScene.AllSubMenus[i].GetComponent <BasicSubMenuPanel>(); if (P.buildingId == BuildingId) { IndexInHS = i; thisTag = (HomeScene.HomeSceneSubMenu)i; //buildingImg //NPCImg NameText.text = thisTag.ToString() + "·" + SDGameManager.T("Lv.") + P.Level; break; } } if (P == null) { return; } bool flag = P.CheckIfCanLvUp(); lvUpBtn.interactable = flag; }
public string randomTeamNameBefore() { string[] examples = new string[] { "勇者", "冒险", "讨伐", "战斗", "前进" }; return(SDGameManager.T(examples[UnityEngine.Random.Range(0, examples.Length)])); }
public void setHero(int hashcode) { GDEHeroData heroData = SDDataManager.Instance.GetHeroOwnedByHashcode(hashcode); string id = heroData.id; ID = id; careerIndex = SDDataManager.Instance.getHeroCareerById(id); raceIndex = SDDataManager.Instance.getHeroRaceById(id); ROHeroData dal = SDDataManager.Instance.getHeroDataByID(id, heroData.starNumUpgradeTimes); //career RoleCareer c = dal.Info.Career; CareerIconImg.sprite = c.Icon; CareerIconImg.SetNativeSize(); CareerText.text = SDGameManager.T(c.NAME); //race HeroRace r = dal.Info.Race; RaceIconImg.sprite = r.Icon; RaceIconImg.SetNativeSize(); RaceText.text = SDGameManager.T(r.NAME); //rarity RarityImg.sprite = SDDataManager.Instance.raritySprite(dal.quality); RarityImg.SetNativeSize(); //personalDrawImg if (dal.Info.PersonalDrawImg == null) { HCdI_Bg.gameObject.SetActive(false); heroCharacterDrawingImg.sprite = RaceIconImg.sprite; heroCharacterDrawingImg.SetNativeSize(); heroCharacterDrawingImg.color = Color.grey; } else { HCdI_Bg.gameObject.SetActive(true); heroCharacterDrawingImg.sprite = dal.Info.PersonalDrawImg; heroCharacterDrawingImg.SetNativeSize(); heroCharacterDrawingImg.color = Color.white; HCdI_Bg.sprite = RaceIconImg.sprite; HCdI_Bg.SetNativeSize(); HCdI_Bg.color = Color.white; } //RaceIconImg.sprite = int grade = SDDataManager.Instance.getLevelByExp(heroData.exp); _hero.gender = (CharacterSex)heroData.sex; _hero.initData_Hero((Job)careerIndex, raceIndex, grade, dal.quality, dal.starNum , dal.ExportRAL , dal.CRIDmg, dal.DmgReduction, dal.DmgReflection, dal.RewardRate , dal.BarChartRegendPerTurn, ID, dal.Info.Name, heroData.wakeNum); }
public void initInjuriedHero(GDEHeroData hero) { type = SDConstants.ItemType.Hero; itemId = hero.id; itemHashcode = hero.hashCode; // float fatigueRate = SDDataManager.Instance.getHeroFatigueRate(hero.hashCode); int status = SDDataManager.Instance.getHeroStatus(hero.hashCode); Debug.Log("该英雄疲劳值:" + hero.Fatigue); // ROHeroData dal = SDDataManager.Instance.getHeroDataByID(itemId, hero.starNumUpgradeTimes); upText.gameObject.SetActive(true); upText.text = "Lv." + SDDataManager.Instance.getLevelByExp(hero.exp); if (downText) { downText.text = SDGameManager.T(dal.Info.Name); } if (slider) { slider.gameObject.SetActive(true); } // if (status == 2) { isSelected = false; isUnable = false; }//受伤且未进行治疗状态 else if (status == 3) { isSelected = false; isUnable = true; }//已经在治疗状态 else if (status == 0) { isSelected = false; if (fatigueRate > 0.1f) { isUnable = false; } else { isUnable = true; } }//无事可做状态 else { isSelected = false; isUnable = true; } //starVision.StarNum = dal.starNum; starVision.gameObject.SetActive(false); slider.GetChild(0).localScale = new Vector3(1 - fatigueRate, 1, 1); }
/// <summary> /// 初始化英雄出战选人页 /// </summary> /// <param name="hero"></param> public void initBattleHero(GDEHeroData hero) { type = SDConstants.ItemType.Hero; itemId = hero.id; itemHashcode = hero.hashCode; // // ROHeroData dal = SDDataManager.Instance.getHeroDataByID(itemId, hero.starNumUpgradeTimes); //if (frameImg != null) frameImg.gameObject.SetActive(false); upText.gameObject.SetActive(true); upText.text = SDGameManager.T("Lv.") + SDDataManager.Instance.getLevelByExp(hero.exp); downText.text = SDGameManager.T(dal.Info.Name); slider?.gameObject.SetActive(false); // int status = SDDataManager.Instance.getHeroStatus(hero.hashCode); if (status == 0) { isSelected = false; isUnable = false; }//无业 else if (status == 1) { isSelected = true; isUnable = false; }//战斗队伍中 else { isSelected = false; isUnable = true; }//其他状态 //statusImg.gameObject.SetActive(true); //statusImg.sprite = herostat starVision.StarNum = dal.starNum; if (careerImg) { Sprite career = dal.Info.Career.Icon; careerImg.sprite = career; } if (raceImg) { Sprite race = dal.Info.Race.Icon; if (dal.Info.Race.NAME == "无种族") { HeroRace _r = dal.Info.Race; race = _r.Icon; } raceImg.sprite = race; } itemBgImg.sprite = SDDataManager.Instance.heroBgSpriteByRarity(dal.Info.Rarity); frameImg.sprite = SDDataManager.Instance.heroFrameSpriteByRarity(dal.Info.Rarity); }
public void initThisUnitTeam(GDEunitTeamData Team) { if (BTP == null) { BTP = GetComponentInParent <BattleTeamPanel>(); } TeamEmpty.gameObject.SetActive(false); if (Team != null) { this.TeamId = Team.id; List <GDEHeroData> all = SDDataManager.Instance.getHerosFromTeam(TeamId); if (all.Count > 0) { // if (!string.IsNullOrEmpty(Team.goddess)) { GoddessInfo goddess = SDDataManager.Instance.getGoddessInfoById(Team.goddess); TeamGoddess.GetComponentInChildren <Image>().sprite = goddess.FaceIcon; } else { } // if (Team.teamName != "" && Team.teamName != null) { TeamNameText.text = Team.teamName; } else { TeamNameText.text = randomTeamNameBefore() + SDGameManager.T("小队") + Team.id; } // for (int i = 0; i < all.Count; i++) { TeamHeroes[i] = all[i].hashCode; } // if (Team.badge > 0) { } else { } } else { ShowEmpty(); } } else { ShowEmpty(); } }
private void FixedUpdate() { if (CDTime > 0 && countDownTime > 0) { countDownTime -= Time.deltaTime; return; } countDownTime = 1.0f; CDTime--; autoCloseText.text = SDGameManager.T("AutoCloseCDTime") + "00:0" + CDTime; }
public void refreshAllPurchaseTypeBtns() { for (int i = 0; i < (int)purchaseType.end; i++) { if (i < BtnsContent.childCount && BtnsContent.GetChild(i).GetComponent <Button>()) { BtnsContent.GetChild(i).GetComponentInChildren <Text>().text = SDGameManager.T(((purchaseType)i).ToString()); } } }
public void SumonTenTimes_n() { CurrentAltarType = AltarType.n_tenTime; if (SDDataManager.Instance.getConsumableNum(Coupon_n_tenTimes.ID) > 0) { InitDAP(); } else { if (SDDataManager.Instance.getConsumableNum(Coupon_n_oneTime.ID) > 10) { InitDAP(); } else { if (SDDataManager.Instance.PlayerData.damond >= SDConstants.altarDamondCost * 10) { if (SDDataManager.Instance.PlayerData.damond >= SDConstants.altarDamondCost) { PopoutController.CreatePopoutAlert ( SDGameManager.T("提醒") , SDGameManager.T("确认消耗") + SDConstants.altarDamondCost * 10 + SDGameManager.T("钻石") , 25, false, PopoutController.PopoutWIndowAlertType.ConfirmMessage , (PopoutController pop , PopoutController.PopoutWindowAlertActionType type) => { if (type == PopoutController.PopoutWindowAlertActionType.OnConfirm) { InitDAP(); //pop.Dismiss(); } else { //pop.Dismiss(); } StartCoroutine(pop.Dismiss()); } ); } else { Debug.Log("无法获取:道具或钻石不足"); return; } } } } }
public void refreshCurrentNewAddingExp() { currentAddingFigure = 0; GDEHeroData data = SDDataManager.Instance.getHeroByHashcode(heroDetail.Hashcode); //HeroInfo indo = SDDataManager.Instance.getHeroInfoById(data.id); for (int i = 0; i < AllSlots.Length; i++) { bool locked = SDDataManager.Instance.checkHeroExpIfOverflow (data.exp, heroDetail.StarNumVision.StarNum); SingleSlot slot = AllSlots[i]; slot.isLocked = locked; if (!slot.isEmpty && !slot.isLocked) { if (slot.ItemType == SDConstants.ItemType.Hero) { int _exp = SDDataManager.Instance.getHeroExpPrice(heroDetail.Hashcode); currentAddingFigure += _exp; } else if (slot.ItemType == SDConstants.ItemType.Consumable) { int _exp = SDDataManager.Instance.getFigureFromMaterial(slot._id); currentAddingFigure += _exp; } } } //预计等级提升动画 int oldLv = SDDataManager.Instance.getLevelByExp(data.exp); int newLv = SDDataManager.Instance.getLevelByExp(data.exp + currentAddingFigure); expPart_lv_text.text = SDGameManager.T("Lv.") + oldLv + " > " + SDGameManager.T("Lv.") + newLv; expPart_exp_text.text = (data.exp - SDDataManager.Instance.getMinExpReachLevel(oldLv) + currentAddingFigure) + "/" + SDDataManager.Instance.ExpBulkPerLevel(oldLv); expPart_slider_old.localScale = new Vector3 ((data.exp - SDDataManager.Instance.getMinExpReachLevel(oldLv)) * 1f / SDDataManager.Instance.ExpBulkPerLevel(oldLv), 1, 1); int overExp = data.exp + currentAddingFigure - SDDataManager.Instance.getMinExpReachLevel(oldLv); float rate = overExp * 1f / SDDataManager.Instance.ExpBulkPerLevel(oldLv); expPart_slider_new.localScale = new Vector3(rate, 1, 1); //升级确认按钮状态 BtnToConfirmCurrentImprove.interactable = currentAddingFigure > 0 && !SDDataManager.Instance.checkHeroExpIfOverflow (data.exp, heroDetail.StarNumVision.StarNum); //exp专有 TooFlowToAdd = SDDataManager.Instance.checkHeroExpIfOverflow (data.exp + currentAddingFigure, heroDetail.StarNumVision.StarNum); }
/// <summary> /// 构建英雄数据 /// </summary> /// <param name="heroJob"></param> /// <param name="grade">英雄当前等级</param> /// <param name="quality"></param> /// <param name="Level"></param> /// <param name="ra"></param> /// <param name="raRate"></param> /// <param name="speed"></param> /// <param name="cri"></param> /// <param name="criDmg"></param> /// <param name="dmgReduction"></param> /// <param name="dmgReflection"></param> /// <param name="RewardRate"></param> /// <param name="bcRegendPerTurn"></param> /// <param name="id"></param> /// <param name="name"></param> /// <param name="wakeNum"></param> public virtual void initData_Hero(Job heroJob, Race heroRace, int grade , int quality, int Level , RoleAttributeList ra , int criDmg, int dmgReduction, int dmgReflection, int RewardRate , RoleBarChart bcRegendPerTurn, string id, string name, int wakeNum) { LEVEL = Level; Quality = quality; RoleBasicRA = ra.Clone; CRIDmg = criDmg; DmgReduction = dmgReduction; DmgReflection = dmgReflection; this.RewardRate = RewardRate; BarChartRegendPerTurn = bcRegendPerTurn; ID = id; Name = name; AddMultiplier(grade); AddWakeMultiplier(wakeNum); //补充设置(职业影响) switch (heroJob) { case Job.Fighter: initData_supplement_H_Fighter(RoleBasicRA, grade); break; case Job.Ranger: initData_supplement_H_Ranger(RoleBasicRA, grade); break; case Job.Priest: initData_supplement_H_Priest(RoleBasicRA, grade); break; case Job.Caster: initData_supplement_H_Caster(RoleBasicRA, grade); break; } switch (heroRace) { case Race.Human: initData_supplement_H_human(); break; case Race.Elf: initData_supplement_H_elf(); break; case Race.Dragonborn: initData_supplement_H_dragonborn(); break; } AddLEVELNumMultiplier(LEVEL); Name = SDGameManager.T(name); }
public virtual void initData(int level, RoleAttributeList dataRA , int criDmg, int dmgReduction, int dmgReflection, int RewardRate , RoleBarChart bcRegendPerTurn, string id, string name, int wakeNum) { LEVEL = level; RoleBasicRA = dataRA.Clone; CRIDmg = criDmg; DmgReduction = dmgReduction; DmgReflection = dmgReflection; this.RewardRate = RewardRate; BarChartRegendPerTurn = bcRegendPerTurn; ID = id; Name = SDGameManager.T(name); }
public override void RefreshImprovePanel() { base.RefreshImprovePanel(); int hashcode = equipDetail.equipHashcode; GDEEquipmentData equip = SDDataManager.Instance.getEquipmentByHashcode(hashcode); if (lvText && expText && expSlider && expSlider_listorder) { int lv = equip.lv; lvText.text = SDGameManager.T("Lv.") + lv; } }
public void initEnemy(GDEItemData item) { itemId = item.id; itemNum = item.num; EnemyInfo E = SDDataManager.Instance.getEnemyInfoById(itemId); itemLevel = E.EnemyRank.Index; if (upText) { upText.gameObject.SetActive(true); upText.text = SDGameManager.T(E.Name); } starVision.StarNum = itemLevel; }
public void initPurchase(GDEItemData Purchase, bool useDamond = false) { itemId = Purchase.id; itemNum = Purchase.num; extraTrigger = useDamond; SDConstants.ItemType item_type = SDDataManager.Instance.getItemTypeById(itemId); type = item_type; int bpg = 0; if (type == SDConstants.ItemType.Consumable) { consumableItem data = SDDataManager.Instance.getConsumableById(itemId); if (upText) { upText.text = SDGameManager.T(data.name); } // itemImg.sprite = data.IconFromAtlas; itemBgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(data.LEVEL); frameImg.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(data.LEVEL); // string downT = ""; if (!useDamond) { bpg = data.buyPrice_coin * Purchase.num; downT = SDGameManager.T("金币") + " - " + bpg; } else { bpg = data.buyPrice_diamond * Purchase.num; downT = SDGameManager.T("钻石") + " - " + bpg; } if (downText) { downText.text = downT; } } if (SDDataManager.Instance.PlayerData.damond < bpg) { downText.transform.parent.GetComponent <Button>().interactable = false; } else { downText.transform.parent.GetComponent <Button>().interactable = true; } }
public void initRuneInPage(GDERuneData E) { if (E == null || E.Hashcode <= 0) { isEmpty = true; return; } isEmpty = false; if (upText) { upText.text = SDGameManager.T("Lv.") + E.level; } if (starVision) { starVision.gameObject.SetActive(false); } RuneItem item = SDDataManager.Instance.getRuneItemById(E.id); // frameImg.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(item.Quality); itemBgImg.sprite = SDDataManager.Instance.baseBgSpriteByRarity(item.Quality); // itemHashcode = E.Hashcode; itemId = E.id; GoddessDetailPanel GDP = GetComponentInParent <GoddessDetailPanel>(); if (GDP == null) { return; } string goddessId = GDP.CurrentGoddess.ID; isSelected = false; if (SDDataManager.Instance.checkRuneEquippedByGoddess(itemHashcode, goddessId, out int pos)) { isSelected = true; index = pos; upText.text += "-----" + index; } else if (SDDataManager.Instance.checkRuneStatus(itemHashcode)) { isSelected = true; } }
public void initHeroDetailPanel(int hashcode , SDConstants.CharacterType type = SDConstants.CharacterType.Hero) { Type = type; if (Type == SDConstants.CharacterType.Hero) { equipList.BuildEquipListBase(); equipList.HD = this; if (_hero == null) { _hero = equipList.gameObject.AddComponent <SDHero>(); } ID = SDDataManager.Instance.getHeroIdByHashcode(hashcode); GDEHeroData hero = SDDataManager.Instance.GetHeroOwnedByHashcode(hashcode); Hashcode = hashcode; setHero(Hashcode); setHelmet(Hashcode); setBreastplate(Hashcode); // setGardebras(Hashcode);//已过期 setLegging(Hashcode); setJewelry(Hashcode, false); setJewelry(Hashcode, true); setWeapon(Hashcode); InitHeroBasicProperties(); RALPanel.initRAL(this.RoleBasicRA , Type , SDDataManager.Instance.getLevelByExp(hero.exp));//视觉展示属性 setRoleBaseMessiage(); if (LvText) { int exp = hero.exp; int lv = SDDataManager.Instance.getLevelByExp(exp); LvText.text = SDGameManager.T("Lv.") + lv; } readHeroSkills(); // heroHeadImg.initHeroCharacterModel(Hashcode, SDConstants.HERO_MODEL_BIG_RATIO); } }
public void initGameRevive() { Time.timeScale = 1; // UIEffectManager.Instance.hideAnimFadeOut(gameFailPanel); UIEffectManager.Instance.showAnimFadeIn(gameRevivePanel); GameS.initAllDropsAndCoins(); // autoCloseText.gameObject.SetActive(false); if (SDDataManager.Instance.SettingData.isAutoHang || SDDataManager.Instance.SettingData.isAutoBattle) { Invoke("closeBtnTapped", 10f); CDTime = 10; countDownTime = 1f; autoCloseText.gameObject.SetActive(true); autoCloseText.text = SDGameManager.T("AutoCloseCDTimes") + "00:10"; } reviveTimesText.text = ""; }
public void showCurrentItemDetail(string id, int num) { CDP.id = id; consumableItem item = SDDataManager.Instance.getConsumableById(id); currentItemType = item.ItemType; if (currentItemType == SDConstants.ItemType.Consumable) { ResolveBtn.gameObject.SetActive(!item.isProp); } CDP.initDetailPanel(id); // if (item.MaterialType == SDConstants.MaterialType.equip_reap) { CDP.SelectedNumSlider.gameObject.SetActive(true); ResolveBtn.gameObject.SetActive(true); // ResolveBtn.GetComponentInChildren <Text>().text = SDGameManager.T("解锁"); } else if (item.MaterialType == SDConstants.MaterialType.treasure || item.MaterialType == SDConstants.MaterialType.key || item.MaterialType == SDConstants.MaterialType.goddess_piece || item.MaterialType == SDConstants.MaterialType.end) { CDP.SelectedNumSlider.gameObject.SetActive(false); ResolveBtn.gameObject.SetActive(false); } else { CDP.SelectedNumSlider.gameObject.SetActive(true); ResolveBtn.gameObject.SetActive(true); // ResolveBtn.GetComponentInChildren <Text>().text = SDGameManager.T("出售"); } }
public void initOneSkillSlot(OneSkill skill) { if (skill == null) { emptyPanel.gameObject.SetActive(true); return; } if (skill.lv < 0 || string.IsNullOrEmpty(skill.skillId)) { emptyPanel.gameObject.SetActive(true); } else { emptyPanel.gameObject.SetActive(false); lv = skill.lv; slotAboveText.text = SDGameManager.T("Lv.") + lv; Transform skillBtn;; if (skill.UseAppointedPrefab) { skillBtn = skill.SkillPrefab; } else { skillBtn = HDP.skillDetailList.AllSkillList[skill.SkillFunctionID]; } skillItemImg.color = skillBtn.GetComponent <Image>().color; } id = skill.skillId; isOmega = skill.isOmegaSkill; if (isOmega) { skillBgIcon.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(3); } else { skillBgIcon.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(1); } }
public void initEquipDetailVision(GDEEquipmentData equip) { equipId = equip.id; equipHashcode = equip.hashcode; equipData = SDDataManager.Instance.GetEquipItemById(equipId); // int lv = equip.lv; nameText.text = (lv > 0?SDGameManager.T("Lv.") + lv + "·":"") + equipData.NAME; equipLv = lv; equipPosImg.sprite = SDDataManager.Instance.equipPosIcon(equipData.EquipPos); equipPosImg.SetNativeSize(); starVision.StarNum = equip.quality; // equipIcon.sprite = equipData.IconFromAtlas; equipBgIcon.sprite = SDDataManager.Instance.baseBgSpriteByRarity(equipData.LEVEL); equipFrameIcon.sprite = SDDataManager.Instance.baseFrameSpriteByRarity(equipData.LEVEL); // EDP.EmptyPanel.gameObject.SetActive(false); }
public void initSkillItem(OneSkill baseskilldata, int heroHashcode = 0) { deploy = SDConstants.deployType.skill; ItemId = baseskilldata.skillId; lv = baseskilldata.lv; DownText.text = SDGameManager.T("Lv.") + lv; if (heroHashcode > 0) { OneSkill S = SDDataManager.Instance.getOwnedSkillById (ItemId, heroHashcode); isOmega = S.isOmegaSkill; if (isOmega) { itemFrameImg.sprite = SDDataManager.Instance .baseFrameSpriteByRarity(3); } else { itemFrameImg.sprite = SDDataManager.Instance .baseFrameSpriteByRarity(1); } } }