예제 #1
0
 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])
     };
 }
예제 #2
0
 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])
     };
 }