public void SetupHero(BaseHeroInformationData baseHeroInformationData) { heroName.text = baseHeroInformationData.unitInformation.attackType.ToString(); if (baseHeroInformationData.skillsList != null && baseHeroInformationData.skillsList.Count > 0) { SetupSkillSet(baseHeroInformationData.skillsList[0]); } else { SetupSkillSet(null); } List <float> tmpStats = new List <float>(); UnitInformationData tmp = baseHeroInformationData.unitInformation; tmpStats.Add(tmp.maxHealth); tmpStats.Add(tmp.maxDamage); float visualSpd = tmp.RealSpeed * 10; tmpStats.Add(visualSpd); tmpStats.Add(tmp.range); SetupFillIcons(tmpStats); }
public static TroopsInformation ConvertToTroopsInformation(UnitInformationData unitData, int availableCount) { TroopsInformation tmp = new TroopsInformation(); tmp.unitInformation = new UnitInformationData(); tmp.unitInformation = unitData; tmp.totalUnitsAvailableForDeployment = availableCount; tmp.totalUnitCount = availableCount; return(tmp); }