Example #1
0
		// -------------------------------------------------------------------------
		// Public API
		// -------------------------------------------------------------------------
		/// <summary>Adds a tween or timeline to the manager and starts or restarts it.</summary>
		/// <remarks>Adds a tween or timeline to the manager and starts or restarts it.</remarks>
		/// <returns>The manager, for instruction chaining.</returns>
		public virtual TweenManager Add(IBaseTween tween)
		{
			if (!objects.Contains(tween))
			{
				objects.Add(tween);
			}
			if (tween.isAutoStartEnabled)
			{
				tween._Start();
			}
			return this;
		}
Example #2
0
 public abstract void OnEvent <T>(int type, IBaseTween source);
Example #3
0
		/// <summary>
		/// Disables or enables the "auto start" mode of any tween manager for a
		/// particular tween or timeline.
		/// </summary>
		/// <remarks>
		/// Disables or enables the "auto start" mode of any tween manager for a
		/// particular tween or timeline. This mode is activated by default. If it
		/// is not enabled, add a tween or timeline to any manager won't start it
		/// automatically, and you'll need to call .start() manually on your object.
		/// </remarks>
		public static void SetAutoStart(IBaseTween @object, bool value)
		{
			@object.isAutoStartEnabled = value;
		}
Example #4
0
		// -------------------------------------------------------------------------
		// Static API
		// -------------------------------------------------------------------------
		/// <summary>
		/// Disables or enables the "auto remove" mode of any tween manager for a
		/// particular tween or timeline.
		/// </summary>
		/// <remarks>
		/// Disables or enables the "auto remove" mode of any tween manager for a
		/// particular tween or timeline. This mode is activated by default. The
		/// interest of desactivating it is to prevent some tweens or timelines from
		/// being automatically removed from a manager once they are finished.
		/// Therefore, if you update a manager backwards, the tweens or timelines
		/// will be played again, even if they were finished.
		/// </remarks>
		public static void SetAutoRemove(IBaseTween @object, bool value)
		{
			@object.isAutoRemoveEnabled = value;
		}