public Body(BodyTemplate template) { HitLocations = template.HitLocations.Select(hlt => new HitLocation(hlt)).ToArray(); TotalProbabilityMap = new Dictionary <Stance, int> { [Stance.Standing] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Standing]), [Stance.Kneeling] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Kneeling]), [Stance.Prone] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Prone]) }; }
public Body(List <HitLocation> hitLocations) { HitLocations = hitLocations.ToArray(); TotalProbabilityMap = new Dictionary <Stance, int> { [Stance.Standing] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Standing]), [Stance.Kneeling] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Kneeling]), [Stance.Prone] = HitLocations.Sum(hl => hl.Template.HitProbabilityMap[(int)Stance.Prone]) }; }
public void SetData(float dmg, HitLocations location) { this.damage = dmg; this.hitLocation = location; }