Esempio n. 1
0
    public void RandomizeModel()
    {
        ModelInfos.Randomize();

        GenderText.text    = ModelInfos.Gender.ToString();
        SkinToneText.text  = ModelInfos.SkinTone.ToString();
        HairTypeText.text  = ModelInfos.HairType.ToString();
        HairColorText.text = ModelInfos.HairColor.ToString();

        NeedUpdateModel = true;
    }
Esempio n. 2
0
    public static GameObject BuildModel(HumanModelInfos modelInfos, UnitEquipment unitEquipment)
    {
        GameObject model = GameObject.Instantiate((GameObject)Resources.Load("Body/Template", typeof(GameObject)));

        if (modelInfos == null)
        {
            modelInfos = new HumanModelInfos();
            modelInfos.Randomize();
        }

        AddHair(model, modelInfos);
        AddBody(model, modelInfos, unitEquipment.Body);
        AddHead(model, unitEquipment.Head);
        AddBack(model, unitEquipment.Back);
        AddWeapons(model, unitEquipment.RightWeapon, unitEquipment.LeftWeapon);

        return(model);
    }