Esempio n. 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);
				}
			}
		}
Esempio n. 2
0
 public void Stop()
 {
     this.Reset();
     this.controller = null;
 }
Esempio n. 3
0
		public void Stop() {
			this.Reset();
			this.controller = null;
		}