示例#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);
 }
示例#2
0
文件: Сlothes.cs 项目: Geksogod/TPR
 public void UpdateClothes(Mesh newClothes, Сlothes clothes)
 {
     if (CanUpdate(clothes))
     {
         clothes.itemMesh = newClothes;
     }
     else
     {
         Debug.LogError("Can't update this clothes.Use clothes.CanUpdate()");
     }
 }
示例#3
0
文件: Human.cs 项目: Geksogod/TPR
    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;
    }
示例#4
0
文件: Сlothes.cs 项目: Geksogod/TPR
 public ClothesType GetGlothesType(Сlothes clothes)
 {
     return(clothes.clothesType);
 }
示例#5
0
文件: Сlothes.cs 项目: Geksogod/TPR
 public bool CanUpdate(Сlothes clothes)
 {
     return(Mathf.Approximately(clothes.durability, 100));
 }
示例#6
0
文件: Сlothes.cs 项目: Geksogod/TPR
 public float GetProtection(Сlothes clothes)
 {
     return(clothes.protection);
 }
示例#7
0
文件: Сlothes.cs 项目: Geksogod/TPR
 public float GetPrestige(Сlothes clothes)
 {
     return(clothes.prestige);
 }