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 ReadAllDataFromGDE() { SDDataManager dm = SDDataManager.Instance; // refreshNumbers(); // bool teamHaveGoddess = false; if (dm.PlayerData.heroesTeam != null && dm.PlayerData.heroesTeam.Count > 0) { GDEunitTeamData team = dm.PlayerData.heroesTeam[0]; if (!string.IsNullOrEmpty(team.goddess)) { teamHaveGoddess = true; GoddessInfo info = dm.getGoddessInfoById(team.goddess); //goddessIcon.sprite = player_name_text.text = info.Name; } } if (!teamHaveGoddess) { List <GDEgoddessData> gs = dm.getAllGoddessesUnLocked(); if (gs.Count > 0) { GoddessInfo info = dm.getGoddessInfoById(gs[0].id); //goddessIcon.sprite = player_name_text.text = info.Name; } } // //player_name_text = dm.PlayerData // }
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(); } }
public void refreshAllGoddessesCondition() { GoddessInfo[] All = Resources.LoadAll <GoddessInfo>("ScriptableObjects/goddess"); for (int i = 0; i < All.Length; i++) { SDDataManager.Instance.addGoddess(All[i]); } GoddessInfo info = All.ToList().Find(x => x.Name.Contains("莱希亚")); SDDataManager.Instance.IncreaseGoddessVolume(info.ID, 50); }
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; } }