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); }
public void UpdateClothes(Mesh newClothes, Сlothes clothes) { if (CanUpdate(clothes)) { clothes.itemMesh = newClothes; } else { Debug.LogError("Can't update this clothes.Use clothes.CanUpdate()"); } }
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; }
public ClothesType GetGlothesType(Сlothes clothes) { return(clothes.clothesType); }
public bool CanUpdate(Сlothes clothes) { return(Mathf.Approximately(clothes.durability, 100)); }
public float GetProtection(Сlothes clothes) { return(clothes.protection); }
public float GetPrestige(Сlothes clothes) { return(clothes.prestige); }