예제 #1
0
 public bool RunAfterAnimation(CStatusAnimatedImage.enStatus status, System.Action callback)
 {
     if (status == enStatus.Idle)
     {
         SetCallbackAction(callback);
         return(true);
     }
     else if (_images[(int)status - 1] != null)
     {
         _images[(int)status - 1].SetCallbackAction(callback);
         return(true);
     }
     // in case relevant animation missing, don't set it
     return(false);
 }
예제 #2
0
 public double GetTotalFrameDuration(CStatusAnimatedImage.enStatus status)
 {
     if (status == enStatus.Idle)
     {
         return(this.TotalFrameDuration);
     }
     else if (_images[(int)status - 1] != null)
     {
         return(_images[(int)status - 1].TotalFrameDuration);
     }
     else
     {
         // in case relevant animation missing, return 0
         return(0);
     }
 }