Exemplo n.º 1
0
 public BodyPositioning EnsureBodyPositioning()
 {
     this.EnsureSetup();
     if (this.mBodyPosition == null)
     {
         this.mBodyPosition = this.gameObject.GetComponent <BodyPositioning> ();
     }
     if (this.mBodyPosition == null)
     {
         this.mBodyPosition = this.gameObject.AddComponent <BodyPositioning> ();
     }
     Debug.Assert(this.mBodyPosition != null);
     return(this.mBodyPosition);
 }
Exemplo n.º 2
0
    public void CopyPositioningFrom(BodyPositioning other)
    {
        this.BuildBoneMap();
        other.BuildBoneMap();

        foreach (var b in other.Bones)
        {
            if (this.Bones.ContainsKey(b.Key))
            {
                var t = this.Bones [b.Key];
                var f = b.Value;

                t.Object.localPosition = f.Object.localPosition;
                t.Object.localRotation = f.Object.localRotation;
            }
        }
    }