Example #1
0
		public static void ShrinkWidth(GumpAnimation anim)
		{
			var p = 1.0 - anim.State.Slice;

			foreach (var e in anim.Entries)
			{
				int w;

				if (e.TryGetWidth(out w))
				{
					e.TrySetWidth((int)Math.Ceiling(w * p));
				}
			}
		}
Example #2
0
		public static void ShrinkHeight(GumpAnimation anim)
		{
			var p = 1.0 - anim.State.Slice;

			foreach (var e in anim.Entries)
			{
				int h;

				if (e.TryGetHeight(out h))
				{
					e.TrySetHeight((int)Math.Ceiling(h * p));
				}
			}
		}
Example #3
0
		public static void Grow(GumpAnimation anim)
		{
			var p = anim.State.Slice;

			foreach (var e in anim.Entries)
			{
				int w, h;

				if (e.TryGetSize(out w, out h))
				{
					e.TrySetSize((int)Math.Ceiling(w * p), (int)Math.Ceiling(h * p));
				}
			}
		}
Example #4
0
		public virtual void OnAnimate(GumpAnimation a)
		{ }