Exemplo n.º 1
0
 internal Entity(IntPtr entity)
     : base(entity)
 {
     if (hasSkeleton())
     {
         skeleton = new SkeletonInstance(Entity_getSkeleton(ogreObject));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Save the skeleton to this description.
 /// </summary>
 /// <param name="skeleton">The skeleton to save.</param>
 public void saveSkeleton(SkeletonInstance skeleton)
 {
     if (skeleton != null)
     {
         for (ushort i = 0; i < skeleton.getNumBones(); i++)
         {
             bones.Add(new BoneInfo(skeleton.getBone(i)));
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Load a skeleton back from this description.
 /// </summary>
 /// <param name="skeleton"></param>
 public void initialzeSkeleton(SkeletonInstance skeleton)
 {
     if (skeleton != null)
     {
         if (skeleton.getNumBones() == bones.Count)
         {
             for (ushort i = 0; i < skeleton.getNumBones(); i++)
             {
                 bones[i].restoreBone(skeleton.getBone(i));
             }
         }
         else
         {
             Log.Default.sendMessage("Mismatched number of bones in loaded skeleton, state not restored.", LogLevel.Error, "ObjectManagement");
         }
     }
 }