Esempio n. 1
0
 public void stopAnimation()
 {
     isPlaying     = false;
     loopAnimation = false;
     currTime      = 0;
     currAnimation = null;
     animMat       = null;
 }
Esempio n. 2
0
        public void playAnimation(string name, bool loop)
        {
            loopAnimation = loop;
            isPlaying     = true;
            currTime      = 0;
            foreach (Mesh3DAnimation a in animations)
            {
                if (a.animName == name)
                {
                    currAnimation = a;
                    break;
                }
            }

            if (currAnimation == null)
            {
                stopAnimation();
                return;
            }

            animMat = new Matrix[currAnimation.channels.Length];
        }