当前位置: 首页>>代码示例>>C#>>正文


C# GenderType.ToString方法代码示例

本文整理汇总了C#中GenderType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# GenderType.ToString方法的具体用法?C# GenderType.ToString怎么用?C# GenderType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GenderType的用法示例。


在下文中一共展示了GenderType.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadClips

        public void LoadClips(GameObject skeleton, ZMD zmd, GenderType gender, RigType rig, Dictionary<String, String> zmoPaths)
        {
            List<AnimationClip> clips = new List<AnimationClip>();

            foreach (KeyValuePair<String, String> motion in zmoPaths)
            {
                string unityPath = "Assets/Resources/Animation/" + gender.ToString() + "/" + rig.ToString() + "/clips/" + motion.Key + ".anim";

                AnimationClip clip = new ZMO("Assets/" + motion.Value).buildAnimationClip(zmd);
                clip.name = motion.Key;
                clip.legacy = true;
                clip = (AnimationClip)Utils.SaveReloadAsset(clip, unityPath, ".anim");
                clips.Add(clip);
            }

            Animation animation = skeleton.AddComponent<Animation>();
            AnimationUtility.SetAnimationClips(animation, clips.ToArray());
        }
开发者ID:osROSE,项目名称:UnityRose,代码行数:18,代码来源:ResourceManager.cs

示例2: loadSkeleton

 public GameObject loadSkeleton(GenderType gender, RigType rig)
 {
     var prefab = Resources.Load("Animation/" + gender.ToString() + "/" + rig.ToString() + "/skeleton");
     var clone = GameObject.Instantiate(prefab);
     return clone as GameObject;
 }
开发者ID:osROSE,项目名称:UnityRose,代码行数:6,代码来源:ResourceManager.cs

示例3: GenerateAnimationAsset

        public void GenerateAnimationAsset(GenderType gender, RigType rig, Dictionary<String,String> zmoPaths)
        {
            GameObject skeleton = new GameObject("skeleton");
            bool male = (gender == GenderType.MALE);
            ZMD zmd = new ZMD(male ? "Assets/3DData/Avatar/MALE.ZMD" : "Assets/3DData/Avatar/FEMALE.ZMD");
            zmd.buildSkeleton(skeleton);

            BindPoses poses = ScriptableObject.CreateInstance<BindPoses>();
            poses.bindPoses = zmd.bindposes;
            poses.boneNames = getBoneNames(zmd.boneTransforms);
            poses.boneTransforms = zmd.boneTransforms;
            LoadClips(skeleton, zmd, gender, rig, zmoPaths);
            string path = "Assets/Resources/Animation/" + gender.ToString() + "/" + rig.ToString() + "/skeleton.prefab";
            AssetDatabase.CreateAsset(poses, path.Replace("skeleton.prefab", "bindPoses.asset"));
            AssetDatabase.SaveAssets();
            PrefabUtility.CreatePrefab(path, skeleton);
        }
开发者ID:osROSE,项目名称:UnityRose,代码行数:17,代码来源:ResourceManager.cs

示例4: loadBindPoses

 /// <summary>
 /// Load bindposes and bones matrices from resources scriptable object
 /// </summary>
 /// <param name="gender"></param>
 /// <param name="weapon"></param>
 /// <returns></returns>
 public BindPoses loadBindPoses(GameObject skeleton, GenderType gender, WeaponType weapon)
 {
     BindPoses poses =  ScriptableObject.Instantiate<BindPoses>((BindPoses)Resources.Load ("Animation/" + gender.ToString () + "/" + weapon.ToString () + "/bindPoses"));
     for (int i = 0; i < poses.boneNames.Length; i++) {
         poses.boneTransforms[i] = Utils.findChild(skeleton, poses.boneNames[i]);
     }
     return poses;
 }
开发者ID:osROSE,项目名称:UnityRose,代码行数:14,代码来源:ResourceManager.cs


注:本文中的GenderType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。