コード例 #1
0
 public void Hit(Collider collider, Vector3 force, Vector3 point)
 {
     if (this.ik == null)
     {
         Debug.LogError("No IK assigned in HitReaction");
         return;
     }
     HitReaction.HitPointEffector[] array = this.effectorHitPoints;
     for (int i = 0; i < array.Length; i++)
     {
         HitReaction.HitPointEffector hitPointEffector = array[i];
         if (hitPointEffector.collider == collider)
         {
             hitPointEffector.Hit(force, point);
         }
     }
     HitReaction.HitPointBone[] array2 = this.boneHitPoints;
     for (int j = 0; j < array2.Length; j++)
     {
         HitReaction.HitPointBone hitPointBone = array2[j];
         if (hitPointBone.collider == collider)
         {
             hitPointBone.Hit(force, point);
         }
     }
 }
コード例 #2
0
 protected override void OnModifyOffset()
 {
     HitReaction.HitPointEffector[] array = this.effectorHitPoints;
     for (int i = 0; i < array.Length; i++)
     {
         HitReaction.HitPointEffector hitPointEffector = array[i];
         hitPointEffector.Apply(this.ik.solver, this.weight);
     }
     HitReaction.HitPointBone[] array2 = this.boneHitPoints;
     for (int j = 0; j < array2.Length; j++)
     {
         HitReaction.HitPointBone hitPointBone = array2[j];
         hitPointBone.Apply(this.ik.solver, this.weight);
     }
 }