Exemple #1
0
        public void WearCloth(ClothItem c)
        {
            Debug.Log(c);
            SMeshHolder m = GetMeshHolder(c.bodyPart);

            m.meshRenderer.sharedMesh = c.mesh;
            m.meshRenderer.material   = c.material;
            m.meshRenderer.enabled    = true;
        }
Exemple #2
0
 public void SetToDefault()
 {
     for (int i = 0; i < meshHolders.Length; i++)
     {
         SMeshHolder m = meshHolders[i];
         if (m.bodyPart.disableIfNoItem)
         {
             m.meshRenderer.enabled = false;
         }
         else
         {
         }
     }
 }
Exemple #3
0
        public SMeshHolder GetMeshHolder(BodyPart b)
        {
            SMeshHolder result = null;

            for (int i = 0; i < meshHolders.Length; i++)
            {
                if (meshHolders[i].bodyPart == b)
                {
                    result = meshHolders[i];
                    break;
                }
            }

            return(result);
        }