Ejemplo n.º 1
0
        public void Play(string animName)
        {
            ClipAnim animToPlay = Clip.AnimSet[animName];

            System.Diagnostics.Debug.Assert(animToPlay != null);
            Play(animToPlay);
        }
Ejemplo n.º 2
0
 public void Play(ClipAnim anim)
 {
     currentAnim = anim;
     for (int i = 0; i < currentAnim.JointAnims.Count; ++i)
     {
         JointAnimStates[i] = currentAnim.JointAnims[i].CreateState();
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public override void Init(ContentManager content, ClipAnim clipAnim)
        {
            base.Init(content, clipAnim);

            for (int i = 0; i < Frames.Length; ++i)
            {
                Frames[i].Init(content);
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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;
         }
     }
 }
Ejemplo n.º 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;
         }
     }
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 11
0
 public void Play(ClipAnim anim, bool loop, bool forwards, float speedMod = 1f)
 {
     currentAnim.Play(anim, loop, forwards, speedMod);
 }
Ejemplo n.º 12
0
 public void Play(ClipAnim anim, bool loop, float speedMod = 1f)
 {
     Play(anim, loop, true, speedMod);
 }
Ejemplo n.º 13
0
 public void Play(ClipAnim anim)
 {
     Play(anim, true);
 }
Ejemplo n.º 14
0
 public void Play(ClipAnim anim)
 {
     currentAnim = anim;
     for (int i = 0; i < currentAnim.JointAnims.Count; ++i)
     {
         JointAnimStates[i] = currentAnim.JointAnims[i].CreateState();
     }
 }
Ejemplo n.º 15
0
 public void Play(ClipAnim anim, bool loop, float speedMod = 1f)
 {
     currentAnim.Play(anim, loop, speedMod);
 }
Ejemplo n.º 16
0
 public void Play(ClipAnim anim, bool loop, float speedMod=1f)
 {
     Play(anim, loop, true, speedMod);
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 18
0
 public void Play(ClipAnim anim, bool loop)
 {
     currentAnim.Play(anim, loop);
 }
Ejemplo n.º 19
0
 public void Play(ClipAnim anim, bool loop)
 {
     currentAnim.Play(anim, loop);
 }
Ejemplo n.º 20
0
 public void Play(ClipAnim anim)
 {
     Play(anim, true);
 }
Ejemplo n.º 21
0
 public void Play(ClipAnim anim, bool loop)
 {
     Play(anim, loop, true);
 }
Ejemplo n.º 22
0
 public void Play(ClipAnim anim, bool loop)
 {
     Play(anim, loop, true);
 }