예제 #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
    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);
    }
예제 #3
0
    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);
    }
예제 #4
0
 public GameObject GetLeftHand(Human.HumanType humanType)
 {
     return(SetLeftHand_(humanType));
 }
예제 #5
0
 public Mesh GetHead(Human.HumanType humanType)
 {
     return(SetHead_(humanType));
 }