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

            System.Diagnostics.Debug.Assert(animToPlay != null);
            Play(animToPlay);
        }
Esempio 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();
     }
 }
Esempio 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);
        }
        public override void Init(ContentManager content, ClipAnim clipAnim)
        {
            base.Init(content, clipAnim);

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