Ejemplo n.º 1
0
        public MotionPlayer(MmdMotion motion, Poser poser)
        {
            _motion = motion;
            _poser  = poser;
            var model = poser.Model;

            for (var i = 0; i < model.Bones.Length; ++i)
            {
                var name = model.Bones[i].Name;
                if (motion.IsBoneRegistered(name))
                {
                    _boneMap.Add(new KeyValuePair <string, int>(name, i));
                }
            }

            for (var i = 0; i < model.Morphs.Length; ++i)
            {
                var name = model.Morphs[i].Name;
                if (motion.IsMorphRegistered(name))
                {
                    _morphMap.Add(new KeyValuePair <string, int>(name, i));
                }
            }
        }
 public abstract void RemovePoser(Poser poser);
 public abstract void AddPoser(Poser poser);
 protected static BoneImage GetPoserImage(Poser poser, int index)
 {
     return(poser.BoneImages[index]);
 }