Example #1
0
		public void Play(Animation animation, bool forcePlayOnce, Action callback) {
			if (!forcePlay) {
				this.Reset();
				this.forcePlay = forcePlayOnce;
				this.callback = callback;
				if (animation != null && (this.controller == null || this.controller.Animation != animation)) {
					if (controller != null) controller.FocusLost();
					this.controller = new AnimationController(animation);

					if (!this.cachedAnimations.ContainsKey(animation) || animation.Resettable) {
					} else {
						this.controller = this.cachedAnimations[animation];
					}

					if (!this.cachedAnimations.ContainsKey(animation)) {
						this.cachedAnimations.Add(animation, this.controller);
					}
					this.controller.LoopPassed += new EventHandler(onLoopPassed);
				}
			}
		}
Example #2
0
 public void Stop()
 {
     this.Reset();
     this.controller = null;
 }
Example #3
0
		public void Stop() {
			this.Reset();
			this.controller = null;
		}