示例#1
0
        public void Play(string animName)
        {
            ClipAnim animToPlay = Clip.AnimSet[animName];

            System.Diagnostics.Debug.Assert(animToPlay != null);
            Play(animToPlay);
        }
示例#2
0
 public void Play(ClipAnim anim)
 {
     currentAnim = anim;
     for (int i = 0; i < currentAnim.JointAnims.Count; ++i)
     {
         JointAnimStates[i] = currentAnim.JointAnims[i].CreateState();
     }
 }
示例#3
0
        public void Play(string animName, bool loop, bool forwards, float speedMod = 1f)
        {
            ClipAnim animToPlay = Clip.AnimSet[animName];

            System.Diagnostics.Debug.Assert(animToPlay != null);

            Play(animToPlay, loop, forwards, speedMod);
        }
        public override void Init(ContentManager content, ClipAnim clipAnim)
        {
            base.Init(content, clipAnim);

            for (int i = 0; i < Frames.Length; ++i)
            {
                Frames[i].Init(content);
            }
        }
示例#5
0
        public override void Init(ContentManager content, ClipAnim clipAnim)
        {
            base.Init(content, clipAnim);

            for (int i = 0; i < Frames.Length; ++i)
            {
                Frames[i].Init();
            }
        }
示例#6
0
        public void Play(ClipAnim anim, bool loop, bool forwards)
        {
            Anim              = anim;
            AnimPos           = 0.0f;
            Loop              = loop;
            durationInSeconds = (float)Anim.Duration / Anim.Framerate;
            playingState      = forwards ? AnimPlayingState.Playing : AnimPlayingState.PlayingInReverse;

            for (int i = 0; i < Anim.JointAnims.Count; ++i)
            {
                JointAnimStates[i] = Anim.JointAnims[i].CreateState();
            }
        }
示例#7
0
        public void Play(ClipAnim anim, bool loop, bool forwards)
        {
            Anim = anim;
            AnimPos = 0.0f;
            Loop = loop;
            durationInSeconds = (float)Anim.Duration / Anim.Framerate;
            playingState = forwards ? AnimPlayingState.Playing : AnimPlayingState.PlayingInReverse;

            for (int i = 0; i < Anim.JointAnims.Count; ++i)
            {
                JointAnimStates[i] = Anim.JointAnims[i].CreateState();
            }
        }
示例#8
0
 public virtual void Init(ContentManager content, ClipAnim clipAnim)
 {
     parentClipAnim = clipAnim;
     for (int i = 0; i < parentClipAnim.ParentClip.Joints.Length; ++i)
     {
         Joint j = parentClipAnim.ParentClip.Joints[i];
         if (j.Name == JointName)
         {
             joint   = j;
             JointId = i;
             break;
         }
     }
 }
示例#9
0
 public virtual void Init(ContentManager content, ClipAnim clipAnim)
 {
     parentClipAnim = clipAnim;
     for (int i = 0; i < parentClipAnim.ParentClip.Joints.Length; ++i)
     {
         Joint j = parentClipAnim.ParentClip.Joints[i];
         if (j.Name == JointName)
         {
             joint = j;
             JointId = i;
             break;
         }
     }
 }
示例#10
0
        public void Play(ClipAnim anim, bool loop, bool forwards, float speedMod = 1f)
        {
            System.Diagnostics.Debug.Assert(anim != null);
            System.Diagnostics.Debug.Assert(speedMod > 0.0f);

            Anim              = anim;
            AnimPos           = 0.0f;
            Loop              = loop;
            speedModifier     = speedMod;
            durationInSeconds =
                (1f / speedModifier) * ((float)Anim.Duration / Anim.Framerate);
            playingState = forwards ? AnimPlayingState.Playing : AnimPlayingState.PlayingInReverse;

            for (int i = 0; i < Anim.JointAnims.Count; ++i)
            {
                JointAnimStates[i] = Anim.JointAnims[i].CreateState();
            }
        }
示例#11
0
 public void Play(ClipAnim anim, bool loop, bool forwards, float speedMod = 1f)
 {
     currentAnim.Play(anim, loop, forwards, speedMod);
 }
示例#12
0
 public void Play(ClipAnim anim, bool loop, float speedMod = 1f)
 {
     Play(anim, loop, true, speedMod);
 }
示例#13
0
 public void Play(ClipAnim anim)
 {
     Play(anim, true);
 }
示例#14
0
 public void Play(ClipAnim anim)
 {
     currentAnim = anim;
     for (int i = 0; i < currentAnim.JointAnims.Count; ++i)
     {
         JointAnimStates[i] = currentAnim.JointAnims[i].CreateState();
     }
 }
示例#15
0
 public void Play(ClipAnim anim, bool loop, float speedMod = 1f)
 {
     currentAnim.Play(anim, loop, speedMod);
 }
示例#16
0
 public void Play(ClipAnim anim, bool loop, float speedMod=1f)
 {
     Play(anim, loop, true, speedMod);
 }
示例#17
0
        public void Play(ClipAnim anim, bool loop, bool forwards, float speedMod=1f)
        {
            System.Diagnostics.Debug.Assert(anim != null);
            System.Diagnostics.Debug.Assert(speedMod > 0.0f);

            Anim = anim;
            AnimPos = 0.0f;
            Loop = loop;
            speedModifier = speedMod;
            durationInSeconds =
                (1f / speedModifier) * ((float)Anim.Duration / Anim.Framerate);
            playingState = forwards ? AnimPlayingState.Playing : AnimPlayingState.PlayingInReverse;

            for (int i = 0; i < Anim.JointAnims.Count; ++i)
            {
                JointAnimStates[i] = Anim.JointAnims[i].CreateState();
            }
        }
示例#18
0
 public void Play(ClipAnim anim, bool loop)
 {
     currentAnim.Play(anim, loop);
 }
示例#19
0
 public void Play(ClipAnim anim, bool loop)
 {
     currentAnim.Play(anim, loop);
 }
示例#20
0
 public void Play(ClipAnim anim)
 {
     Play(anim, true);
 }
示例#21
0
 public void Play(ClipAnim anim, bool loop)
 {
     Play(anim, loop, true);
 }
示例#22
0
 public void Play(ClipAnim anim, bool loop)
 {
     Play(anim, loop, true);
 }