Ejemplo n.º 1
0
 public override void GoingOffDisplay()
 {
     if (Animation != null)
     {
         Animation.Stop();
         Animation = null;
     }
 }
Ejemplo n.º 2
0
        public override void GoingOnDisplay(Css.RenderableData context)
        {
            if (Animation == null && GifFile != null)
            {
                Animation = GifFile.GetInstance();

                // Set the event context now:
                Animation.SetContext(context);
            }
        }
Ejemplo n.º 3
0
        /// <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);
        }