示例#1
0
        /// <summary>
        /// Attaches a clone of the costume item to given CIbody figure.
        /// Send the GameObject of a costumeItem here, and we'll clone it, bind it and return the result
        /// </summary>
        /// <returns>The cloned GameObject of the costume_item</returns>
        /// <param name="costume_item">Costume_item.</param>
        /// <param name="figure">Figure.</param>
        public static GameObject CloneAndAttachCostumeItemToFigure(GameObject costume_item, BoneUtility.BoneMap figure_bone_map, CIbody figure, Transform root_bone)
        {
            // instatiate copy
            GameObject clone = GameObject.Instantiate(costume_item);

            clone.name = costume_item.name;

            // use the basic Attachment method
            GeometryTransferUtility.AttachCostumeItemToFigure(clone, figure_bone_map, figure, root_bone);

            // return the cloned costume_item GameObject
            return(clone);
        }
示例#2
0
 /// <summary>
 /// Binds a given GameObject geometry to a Transform, matching the former's position and rotation.
 /// </summary>
 /// <returns>The geometry to transform.</returns>
 /// <param name="referenceGeometry">GameObject containing the geometry to bind.</param>
 /// <param name="destination_transform">The destination Tansform.</param>
 private GameObject BindGeometryToTransform(GameObject referenceGeometry, Transform destination_transform)
 {
     return(GeometryTransferUtility.BindGeometryToTransform(referenceGeometry, destination_transform));
 }
示例#3
0
 /// <summary>
 /// Attaches a costume item to the figure
 /// </summary>
 /// <returns>A GameObject of the costume item.</returns>
 /// <param name="costume_item">The GameObject of the costume item</param>
 public GameObject AttachCostumeItemToFigure(GameObject costume_item)
 {
     return(GeometryTransferUtility.AttachCostumeItemToFigure(costume_item, this.BoneMap, figure, transform));
 }