Exemplo n.º 1
0
 /// <summary>
 /// Deserialize constructor.
 /// </summary>
 /// <param name="info"></param>
 private EntityDefinition(LoadInfo info)
     : base(info)
 {
     meshName = info.GetString(MESH_NAME);
     if (info.hasValue(SKELETON))
     {
         skeleton = info.GetValue <SkeletonInfo>(SKELETON);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>A new object that is a copy of this instance.</returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            SkeletonInfo clone = new SkeletonInfo();

            foreach (BoneInfo bone in this.bones)
            {
                clone.bones.Add((BoneInfo)bone.Clone());
            }
            return(clone);
        }
Exemplo n.º 3
0
 public EntityDefinition(String name, Entity entity)
     : base(name, entity)
 {
     using (MeshPtr mesh = entity.getMesh())
     {
         meshName = mesh.Value.getName();
     }
     if (entity.hasSkeleton())
     {
         skeleton = new SkeletonInfo();
         skeleton.saveSkeleton(entity.getSkeleton());
     }
 }