public void stopAnimation() { isPlaying = false; loopAnimation = false; currTime = 0; currAnimation = null; animMat = null; }
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]; }