Esempio n. 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])
     };
 }
Esempio n. 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])
     };
 }
Esempio n. 3
0
 public void SetData(float dmg, HitLocations location)
 {
     this.damage = dmg;
     this.hitLocation = location;
 }