public void ShowGoddessMessage(string id) { GDEgoddessData data = SDDataManager.Instance.getGDEGoddessDataById(id); if (data == null) { EmptyVision(); return; } GoddessInfo info = SDDataManager.Instance.getGoddessInfoById(id); NameText.text = info.Name; /* * heroCharacterDrawingImg.sprite = info.FaceIcon; * CareerIconImg.sprite = info.Career.Icon; * CareerText.text = info.Career.NAME; * RaceIconImg.sprite = info.Race.Icon; * RaceText.text = info.Race.NAME; * //NameBeforeText.text * RarityIconImg.sprite = SDDataManager.Instance.raritySprite(info.Rarity); * RarityIconImg.gameObject.SetActive(true); * StarNumVision.StarNum = info.LEVEL + data.starNumUpgradeTimes; * LvText.text = SDGameManager.T("Lv.") + SDDataManager.Instance.getLevelByExp(data.exp); * ExpSlider.localScale = new Vector3(SDDataManager.Instance.getExpRateByExp(data.exp), 1, 1); */ MoreInfoBtn.gameObject.SetActive(true); }
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 refreshGoddessList() { foreach (Transform s in GoddessPV.rect.content) { Image _image = s.GetComponentInChildren <Image>(); if (s.GetSiblingIndex() == 2) { _image.transform.localScale = Vector3.one * 1.25f; _image.color = Color.white; } else { _image.transform.localScale = Vector3.one; _image.color = Color.grey; } } int currentIndex = GoddessPV.currentIndex; GDEgoddessData GD = SDDataManager.Instance.PlayerData.goddessOwned.Find (s => s.index == currentIndex); if (GD != null) { SDGD.initgoddessDetailVision(GD); SDGD.isEmpty = false; } else { SDGD.isEmpty = true; } }
public override void InitImprovePanel() { base.InitImprovePanel(); //int hashcode = string id = goddessDetail.Id; GDEgoddessData goddess = SDDataManager.Instance.getGDEGoddessDataById(id); stockPage.goddessImproveController = this; stockInit(ImproveKind.exp); }
public bool InitGoddess(string id) { CurrentGoddess = SDDataManager.Instance.getGoddessInfoById(id); if (CurrentGoddess == null) { return(false); } GDEgoddessData GDE = SDDataManager.Instance.getGDEGoddessDataById(id); if (GDE == null) { return(false); } // AttiList = CurrentGoddess.GoddessAtti; AttiList += SDDataManager.Instance.GetGoddessAttiByGDE(GDE.attitube); GDERuneData r0 = SDDataManager.Instance.getRuneOwnedByHashcode(GDE.rune0); GDERuneData r1 = SDDataManager.Instance.getRuneOwnedByHashcode(GDE.rune1); GDERuneData r2 = SDDataManager.Instance.getRuneOwnedByHashcode(GDE.rune2); GDERuneData r3 = SDDataManager.Instance.getRuneOwnedByHashcode(GDE.rune3); if (r0 != null) { AttiList += SDDataManager.Instance.GetGoddessAttiByGDE(r0.attitube); } if (r1 != null) { AttiList += SDDataManager.Instance.GetGoddessAttiByGDE(r1.attitube); } if (r2 != null) { AttiList += SDDataManager.Instance.GetGoddessAttiByGDE(r2.attitube); } if (r3 != null) { AttiList += SDDataManager.Instance.GetGoddessAttiByGDE(r3.attitube); } // AttiList.CheckSelf(); // build_goddess_speed(); build_goddess_fatigueReduce(); build_goddess_mpRecover(); build_goddess_attiUp(); // if (!CurrentGoddess.HaveSkill) { return(true); } GoddessSkillInfo Info = CurrentGoddess.SkillInfo; Transform P = Instantiate(Info.Prefab) as Transform; P.SetParent(this.transform); // GoddessSkill GS = P.GetComponent <GoddessSkill>(); GS.BM = FindObjectOfType <BattleManager>(); GS.TargetIsHero = Info.TargetIsHero; GS.AOE = Info.AOE; GS.skillGrade = GDE.skillGrade; GS.Breed = Info.BREED; GS.Kind = Info.KIND; GS.UseState = Info.UseState; GS.State = Info.State; // if (Info.SkillTag == GoddessSkillInfo.GSTag.damage) { GSDamage GSD = P.GetComponent <GSDamage>(); GSD.DamageData = Info._DamageData; GSD.UpBySkillGrade = Info.UpBySkillGrade; } else if (Info.SkillTag == GoddessSkillInfo.GSTag.heal) { GSHeal GSH = P.GetComponent <GSHeal>(); GSH.HealData = Info._HealData; GSH.UpBySkillGrade = Info.UpBySkillGrade; } else if (Info.SkillTag == GoddessSkillInfo.GSTag.addState) { GSAddState GSA = P.GetComponent <GSAddState>(); } GSkill = GS; // return(true); }
public void initgoddessDetailVision(GDEgoddessData goddess) { isEmpty = false; GoddessInfo info = SDDataManager.Instance.getGoddessInfoById(goddess.id); Id = goddess.id; int integrity = SDDataManager.Instance.getIntegrityByVolume(goddess.volume, info.Quality); if (integrity < 1) { isLocked = true; lockedPanelSlider.localScale = new Vector3 (SDDataManager.Instance.getRateAppraochIntegrity(goddess.volume, info.Quality), 1, 1); return; } isLocked = false; lv = SDDataManager.Instance.getLevelByExp(goddess.exp); nameText.text = SDGameManager.T("Lv.") + lv + "ยท" + info.name; quality = info.Quality; //rarityText.text = SDDataManager.Instance.rarityString(quality); // expSlider.localScale = new Vector3 (SDDataManager.Instance.getExpRateByExp(goddess.exp), 1, 1); volumeSlider.localScale = new Vector3 (SDDataManager.Instance.getRateAppraochIntegrity(goddess.volume, info.Quality), 1, 1); // if (SDDataManager.Instance.getRuneEquippedByPosAndGoddess (0, goddess.id, out GDERuneData data0)) { RuneEquipList[0].initRune(data0); } else { RuneEquipList[0].isEmpty = true; } if (SDDataManager.Instance.getRuneEquippedByPosAndGoddess (1, goddess.id, out GDERuneData data1)) { RuneEquipList[1].initRune(data1); } else { RuneEquipList[1].isEmpty = true; } if (SDDataManager.Instance.getRuneEquippedByPosAndGoddess (2, goddess.id, out GDERuneData data2)) { RuneEquipList[2].initRune(data2); } else { RuneEquipList[2].isEmpty = true; } if (SDDataManager.Instance.getRuneEquippedByPosAndGoddess (3, goddess.id, out GDERuneData data3)) { RuneEquipList[3].initRune(data3); } else { RuneEquipList[3].isEmpty = true; } for (int i = 0; i < RuneEquipList.Length; i++) { simpleSlotSet slot = RuneEquipList[i]; slot.resetOnBtnTapped(); slot.OnBtnTapped += GDP.initRuneEquipAndSetPanel; } }