Esempio n. 1
0
 public Сlothes GetBody(Human.HumanType humanType)
 {
     switch (humanType)
     {
     case Human.HumanType.Worker:
         Сlothes clothes = new Сlothes("Worker Robe", 100, 1, 10, Сlothes.ClothesType.Body, SetBody_(humanType));
         return(clothes);
     }
     return(null);
 }
Esempio n. 2
0
 public void UpdateClothes(Mesh newClothes, Сlothes clothes)
 {
     if (CanUpdate(clothes))
     {
         clothes.itemMesh = newClothes;
     }
     else
     {
         Debug.LogError("Can't update this clothes.Use clothes.CanUpdate()");
     }
 }
Esempio n. 3
0
    public void Customization()
    {
        СustomizationSystem cusmomizator = GameObject.Find("СustomizationSystem").GetComponent <СustomizationSystem>();

        head.GetComponent <MeshFilter>().mesh = cusmomizator.GetHead(humanType);
        Сlothes bodyClothes = cusmomizator.GetBody(humanType);

        inventory.AddItem(bodyClothes);
        body.GetComponent <SkinnedMeshRenderer>().sharedMesh = bodyClothes.GetMesh();
        rightHand = rightHand != null?Instantiate(cusmomizator.GetRightHand(humanType), rightHand.transform) : null;
    }
Esempio n. 4
0
 public ClothesType GetGlothesType(Сlothes clothes)
 {
     return(clothes.clothesType);
 }
Esempio n. 5
0
 public bool CanUpdate(Сlothes clothes)
 {
     return(Mathf.Approximately(clothes.durability, 100));
 }
Esempio n. 6
0
 public float GetProtection(Сlothes clothes)
 {
     return(clothes.protection);
 }
Esempio n. 7
0
 public float GetPrestige(Сlothes clothes)
 {
     return(clothes.prestige);
 }