public override void GoingOffDisplay() { if (Animation != null) { Animation.Stop(); Animation = null; } }
public override void GoingOnDisplay(Css.RenderableData context) { if (Animation == null && GifFile != null) { Animation = GifFile.GetInstance(); // Set the event context now: Animation.SetContext(context); } }
/// <summary>A shortcut for instancing it.</summary> public Material Start(Shader shader) { if (GifFile == null) { throw new Exception("Tried to load a broken GIF."); } if (Animation == null) { Animation = GifFile.GetInstance(); } // Setup using the given shader: Animation.Setup(shader); return(Animation.AnimatedMaterial); }