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); }
private Mesh SetBody_(Human.HumanType type) { int ArrayIndex = -1; for (int i = 0; i < customization.Length; i++) { if (customization[i].type == type) { ArrayIndex = i; } } if (ArrayIndex != -1 && customization[0].body.Count >= 1) { int index = Random.Range(0, customization[ArrayIndex].body.Count); for (int i = 0; i < customization[ArrayIndex].body.Count; i++) { if (i == index) { return(customization[ArrayIndex].body[i]); } } } return(null); }
private GameObject SetRightHand_(Human.HumanType type) { int ArrayIndex = -1; for (int i = 0; i < customization.Length; i++) { if (customization[i].type == type) { ArrayIndex = i; } } if (ArrayIndex != -1 && customization[0].rightHand.Length >= 1) { int index = Random.Range(0, customization[ArrayIndex].rightHand.Length); for (int i = 0; i < customization[ArrayIndex].rightHand.Length; i++) { if (i == index) { return(customization[ArrayIndex].rightHand[i]); } } } return(null); }
public GameObject GetLeftHand(Human.HumanType humanType) { return(SetLeftHand_(humanType)); }
public Mesh GetHead(Human.HumanType humanType) { return(SetHead_(humanType)); }