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)); } } }
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)); } } }
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)); } } }
public virtual void OnAnimate(GumpAnimation a) { }