private void SetCharData(HeroInfo heroInfo) { SetConfigInfo(); CurStar = heroInfo.Star; CurAttack = heroInfo.MainProperty[0] + heroInfo.AddAttack; CurDefence = heroInfo.MainProperty[1] + heroInfo.AddDefence; MaxHP = heroInfo.MainProperty[2] + heroInfo.AddHP; CriticalRatio = heroInfo.MainProperty[3]; BlockRatio = heroInfo.MainProperty[4]; Force = heroInfo.MainProperty[5] + heroInfo.AddForce; Strategy = heroInfo.MainProperty[6] + heroInfo.AddStrategy; Rule = heroInfo.MainProperty[7] + heroInfo.AddRule; Polity = heroInfo.MainProperty[8] + heroInfo.AddForce; Charm = heroInfo.MainProperty[9] + heroInfo.AddForce; CurHP = MaxHP; MaxMP = heroInfo.MaxPower; CurMP = MaxMP; OriHP = MaxHP; OriDef = CurDefence; OriAtk = CurAttack; for (int i = 0; i < 5; ++i) { SkillIDs[i] = heroInfo.SkillIDs[i]; _dicSkillLevels.Add(SkillIDs[i], heroInfo.SkillLevels[i]); } }
private void ShowHeroInfo(int heroId) { HeroInfo heroInfo = HeroAll.GetHeroInfo(heroId); for (int i = 0; i < 10; ++i) { Values[i].text = heroInfo.MainProperty[i].ToString(); } }
public static void SetHeroInfo(int heroId, HeroInfo heroInfo) { if (_lstHero.Contains(heroId)) { _dicHero[heroId] = heroInfo; } else { _lstHero.Add(heroId); _dicHero.Add(heroId, heroInfo); } }
public BuffBool Concentrate = new BuffBool(); //集火 public void Init(int charId, BattleEnum.Enum_CharSide side, int iIndex) { m_iCharID = charId; m_eSide = side; m_eState = BattleEnum.Enum_CharState.Idle; SkillIDs = new int[5]; if (iIndex != -1) { HeroInfo heroInfo = BattleManager.GetInst().GetHeroInfo(side, charId); SetCharData(heroInfo); } }