Ejemplo n.º 1
0
    public static ICloths CreatCloth
        (ECharacterResType type, UMAContext _umaContext, CharacterData _characterData, ICharacterSlotOverly _characterSlotOverlay, ICharacterPlayer _character, ICharacterBase _characterBase, ClothModel _cm)
    {
        ICloths ich = null;

        switch (_cm.wearpos)
        {
        case WearPosConst.WAER_POS_CLOTH:
            ich = new Coat(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm);
            break;

        case WearPosConst.WEAR_POS_PANT:
            ich = new Pant(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm);
            break;

        case WearPosConst.WEAR_POS_SUIT:
            ich = new Suit(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm);
            break;

        case WearPosConst.WAER_POS_HAIR:
            ich = new Hair(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm);
            break;

        case WearPosConst.WEAR_POS_SHOE:
            ich = new Shoe(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm);
            break;
        }
        return(ich);
    }
    public EditorAnimationItem(ECharacterResType type, AnimatorControllerLayer layer, EnumCharacterType _sex)
    {
        resType = type;
        AnimatorStateMachine baseSm = layer.stateMachine;

        state        = baseSm.AddState(ClipName);
        sex          = _sex;
        state.motion = motion;
    }
Ejemplo n.º 3
0
 public CharacterCloth
     (ECharacterResType type, CharacterData _characterData, ICharacterSlotOverly _characterSlotOverlay, ICharacterPlayer _character, ICharacterBase _characterBase)
 {
     resType              = type;
     umaContext           = UMAContext.FindInstance();
     characterData        = _characterData;
     characterSlotOverlay = _characterSlotOverlay;
     character            = _character;
     characterBase        = _characterBase;
 }
Ejemplo n.º 4
0
 public static TPoseEditor Creat(EnumCharacterType sex, IFbxItem objBase, ECharacterResType type)
 {
     if (sex == EnumCharacterType.Charater_Female)
     {
         return(new TPoseEditor_Female(objBase, type));
     }
     else
     {
         return(new TPoseEditor_Male(objBase, type));
     }
 }
Ejemplo n.º 5
0
 public static IEditorAnimation Creat(EnumCharacterType sex, ECharacterResType type)
 {
     if (sex == EnumCharacterType.Charater_Female)
     {
         return(new EditorAnimation_Female(type));
     }
     else
     {
         return(new EditorAnimation_Male(type));
     }
 }
Ejemplo n.º 6
0
 public Cloth
     (ECharacterResType type, UMAContext _umaContext, CharacterData _characterData, ICharacterSlotOverly _characterSlotOverlay, ICharacterPlayer _character, ICharacterBase _characterBase, ClothModel _cm)
 {
     resType              = type;
     umaContext           = _umaContext;
     characterSlotOverlay = _characterSlotOverlay;
     character            = _character;
     characterData        = _characterData;
     characterBase        = _characterBase;
     cm          = _cm;
     PutOnDelete = new List <string>();
 }
Ejemplo n.º 7
0
 public CharacterBase
     (ECharacterResType type,
     ICharacterSlotOverly _characterSlotOverlay,
     UMAData _umaData,
     UMADynamicAvatar _umaDynamicAvatar,
     CharacterData _characterData)
 {
     resType              = type;
     umaContext           = UMAContext.FindInstance();
     characterSlotOverlay = _characterSlotOverlay;
     umaData              = _umaData;
     umaDynamicAvatar     = _umaDynamicAvatar;
     characterData        = _characterData;
 }
Ejemplo n.º 8
0
    public EditorClothItem(IObjectBase _obj, IObjectBase diffuse, ECharacterResType type)
    {
        restype = type;
        obj     = _obj;

        texture_diffuse = diffuse;

        Fold = string.Format("{0}/{1}/{2}/{3}", CharacterConst.prefabPath, restype.ToString(), SexName, obj.Name);

        string assetpath = string.Format("{0}/{1}/{2}/{3}/{4}.prefab", CharacterConst.prefabPath, restype.ToString(), SexName, obj.Name, obj.Name);

        prefab = new PrefabItem(assetpath);

        wearpos = obj.Name.Substring(2, 2);
    }
Ejemplo n.º 9
0
 public CharacterClothItem(
     ECharacterResType type,
     UMAContext _umaContext,
     CharacterData _characterData,
     ICharacterSlotOverly _characterSlotOverlay,
     ICharacterPlayer _character,
     ICharacterBase _characterBase)
 {
     resType              = type;
     umaContext           = _umaContext;
     characterData        = _characterData;
     characterSlotOverlay = _characterSlotOverlay;
     character            = _character;
     characterBase        = _characterBase;
 }
Ejemplo n.º 10
0
    public BaseClothItemEditor(IFbxItem _go, ECharacterResType type)
    {
        resType    = type;
        gameObject = _go.Load <GameObject>();
        if (gameObject.name == CharacterConst.Female)
        {
            baseFold = string.Format("{0}/{1}/{2}/{3}", CharacterConst.prefabPath, resType.ToString(), CharacterConst.Female, CharacterConst.Base);
        }
        else if (gameObject.name == CharacterConst.Male)
        {
            baseFold = string.Format("{0}/{1}/{2}/{3}", CharacterConst.prefabPath, resType.ToString(), CharacterConst.Male, CharacterConst.Base);
        }

        uMaterial = new EditorUmaMaterial_Base();
    }
Ejemplo n.º 11
0
    public BaseEditorCloth_Female(ECharacterResType type)
        : base(EnumCharacterType.Charater_Female, type)
    {
        string path = string.Format("{0}/{1}/{2}/{3}.fbx", CharacterConst.rootPath, restype.ToString(), CharacterConst.Female, CharacterConst.Female);

        obj = new FbxItem(path);
        obj.SetReadable(true);

        prefabFold = string.Format("{0}/{1}/{2}", CharacterConst.prefabPath, restype.ToString(), CharacterConst.Female);

        baseOverlayName = string.Format("{0}_{1}", CharacterConst.Female, CharacterConst.Base);
        string skin_d = string.Format("{0}/{1}/{2}/{3}_{4}.png", CharacterConst.rootPath, restype.ToString(), CharacterConst.Female, CharacterConst.Female, CharacterConst.Base);

        skin_diff = new ObjectBase(skin_d);
    }
 public EditorAnimationLayer(ECharacterResType type, AnimatorController _controller, EnumCharacterType _sex)
 {
     resType    = type;
     controller = _controller;
     sex        = _sex;
 }
Ejemplo n.º 13
0
 public EditorAnimation(ECharacterResType type)
 {
     resType = type;
 }
 public EditorAnimationLayer_base(ECharacterResType type, UnityEditor.Animations.AnimatorController _controller, EnumCharacterType _sex) : base(type, _controller, _sex)
 {
 }
Ejemplo n.º 15
0
    public ClothSlotOverlay(IObjectBase obj, Texture2D _diff, string Fold, EditorUmaMaterial mat, ECharacterResType type)
    {
        GameObject go = obj.Load <GameObject>();

        slotMesh = go.GetComponentInChildren <SkinnedMeshRenderer>();
        if (slotMesh == null)
        {
            throw new Exception(obj.Name + " could't find SkinnedMeshRenderer!!!");
        }

        diff = _diff;

        Material[] ms = slotMesh.sharedMaterials;
        for (int i = 0; i < ms.Length; i++)
        {
            sharedMaterials.Add(ms[i].name);
        }

        slotMesh = go.GetComponentInChildren <SkinnedMeshRenderer>();
        //slotMesh.sharedMaterial = null;
        //slotMesh.sharedMaterials = new Material[0];

        baseName    = go.name;
        slotFold    = Fold + "/" + UMAUtils.Slot;
        overlayFold = Fold + "/" + UMAUtils.Overlay;
        Mat         = mat;

        string comTexturePath = null;

        if (baseName.StartsWith("01"))
        {// male
            comTexturePath = string.Format("{0}/{1}/{2}/{3}_{4}.png", CharacterConst.rootPath, type.ToString(), CharacterConst.Male, CharacterConst.Male, CharacterConst.Common);
        }
        else
        {// female
            comTexturePath = string.Format("{0}/{1}/{2}/{3}_{4}.png", CharacterConst.rootPath, type.ToString(), CharacterConst.Female, CharacterConst.Female, CharacterConst.Common);
        }

        IObjectBase comt = new ObjectBase(comTexturePath);

        comTexture = comt.Load <Texture2D>();
        (new CharacterTexture(comTexturePath)).Handle();

        wearpos = int.Parse(baseName.Substring(2, 2));
    }
Ejemplo n.º 16
0
 public Hair(ECharacterResType type, UMAContext _umaContext, CharacterData _characterData, ICharacterSlotOverly _characterSlotOverlay, ICharacterPlayer _character, ICharacterBase _characterBase, ClothModel _cm)
     : base(type, _umaContext, _characterData, _characterSlotOverlay, _character, _characterBase, _cm)
 {
 }
Ejemplo n.º 17
0
 public BaseEditorCloth(EnumCharacterType _sex, ECharacterResType type)
 {
     sex     = _sex;
     restype = type;
 }
Ejemplo n.º 18
0
 public EditorAnimation_Male(ECharacterResType type)
     : base(type)
 {
 }
Ejemplo n.º 19
0
 public EditorAnimationItem_hello(ECharacterResType type, AnimatorControllerLayer layer, EnumCharacterType _sex) : base(type, layer, _sex)
 {
 }
 public SOAService_Resource_Character_Bundle_Female(ECharacterResType type, string _name)
 {
     resType = type;
     Name    = _name;
 }
Ejemplo n.º 21
0
 public EditorBundleName_HumanMale(ECharacterResType type)
 {
     resType = type;
 }
Ejemplo n.º 22
0
 public EditorClothItem_Male(IObjectBase _obj, IObjectBase diffuse, ECharacterResType type = ECharacterResType.Height)
     : base(_obj, diffuse, type)
 {
 }
Ejemplo n.º 23
0
 public EditorClothItem_Female(IObjectBase _obj, IObjectBase diffuse, ECharacterResType type)
     : base(_obj, diffuse, type)
 {
 }
Ejemplo n.º 24
0
 public static IEditorCloth Creat(EnumCharacterType sex, IObjectBase _obj, IObjectBase diffuse, ECharacterResType type)
 {
     if (sex == EnumCharacterType.Charater_Female)
     {
         return(new EditorClothItem_Female(_obj, diffuse, type));
     }
     else
     {
         return(new EditorClothItem_Male(_obj, diffuse, type));
     }
 }
Ejemplo n.º 25
0
 public FaceEditor(IFbxItem go, ECharacterResType type) : base(go, type)
 {
 }
Ejemplo n.º 26
0
 public TPoseEditor(IFbxItem _objBase, ECharacterResType type)
 {
     objBase = _objBase;
     resType = type;
 }
Ejemplo n.º 27
0
 public EditorAnimationLayer_fittingroom(ECharacterResType type, AnimatorController _controller, EnumCharacterType _sex) : base(type, _controller, _sex)
 {
 }
Ejemplo n.º 28
0
 public TPoseEditor_Female(IFbxItem _objBase, ECharacterResType type)
     : base(_objBase, type)
 {
 }
Ejemplo n.º 29
0
 public RoleLoad(ECharacterResType type)
 {
     resType = type;
 }
Ejemplo n.º 30
0
 public EditorBundleName_Common(IObjectBase _obj, ECharacterResType type)
 {
     obj     = _obj;
     resType = type;
 }