public void Animate(TexturePatternEditor editor, BSPRenderer bspRenderer, DFFRenderer dffRenderer) { if (FrameCount == 0) { return; } counter++; counter = counter % FrameCount; for (int i = 0; i < frames.Count; i++) { if (frames[i].FrameOffset == counter) { string newTextureName = AnimationName + "." + frames[i].TextureNumber; if (TextureManager.HasTexture(newTextureName)) { TextureManager.SetTextureForAnimation(TextureName, newTextureName, bspRenderer, dffRenderer); } } } if (isSelected) { editor.SendPlaying(counter); } }
public void StopAnimation(BSPRenderer bspRenderer, DFFRenderer dffRenderer) { counter = 0; if (TextureManager.HasTexture(TextureName)) { TextureManager.SetTextureForAnimation(TextureName, TextureName, bspRenderer, dffRenderer); } }