Example #1
0
 public LabelFader(UXLabel label, UXFactory uxFactory, float showTime, float fadeTime, LabelFaderCompleteDelegate onComplete, int lineCount, UXElement objectToDestroy)
 {
     this.remainingTime   = showTime + fadeTime;
     this.label           = label;
     this.uxFactory       = uxFactory;
     this.fadeTime        = fadeTime;
     this.onComplete      = onComplete;
     this.objectToDestroy = objectToDestroy;
     this.LineCount       = lineCount;
     if (fadeTime > 0f || showTime > 0f)
     {
         Service.ViewTimeEngine.RegisterFrameTimeObserver(this);
     }
 }
Example #2
0
 public void Destroy()
 {
     Service.ViewTimeEngine.UnregisterFrameTimeObserver(this);
     if (this.uxFactory != null)
     {
         this.uxFactory.DestroyElement(this.objectToDestroy);
     }
     if (this.onComplete != null)
     {
         this.onComplete(this);
     }
     this.onComplete      = null;
     this.objectToDestroy = null;
     this.uxFactory       = null;
     this.label           = null;
 }