public static Animation GetAnimationFromUser() { pln(" -- New Animation --"); string response; int numResponse; double dblResponse; Animation res = new Animation(); pnn("Repeatable (yes/no): "); response = getLine(); if (response == "no") res.Repeatable = false; do { pnn("Frame (-1 to end): "); Int32.TryParse(getLine(), out numResponse); if (numResponse >= 0) { pnn("Frame Length (in ms): "); Double.TryParse(getLine(), out dblResponse); res.AddFrame(numResponse, dblResponse); } } while (numResponse >= 0); if (res.Frames.Count > 0) return res; return null; }
public void AddAnimation(Animation newAnim) { Animations.Add(newAnim); }
public IDrawHelper GetAnimationHelper(Animation anim) { return new AnimationHelper(this, anim); }
public void AddAnimation(string key, Animation newAnim) { AnimationLookup.Add(key, Animations.Count); Animations.Add(newAnim); }
public AnimationHelper(TileSheet tileSheet, Animation animation, Point?pos = null, float scale = 1f, float depth = 1f) : base(tileSheet, pos, scale, depth) { Animation = animation; }
public override int GetFrame() { return(Animation.GetFrameFromTime(RunningTime)); }
public AnimationState(TileSheet tileSheet, Animation animation, Point? pos = null, float scale = 1f, float depth = 1f) : base(tileSheet, animation, pos, scale, depth) { }
public AnimationHelper(TileSheet tileSheet, Animation animation, Point? pos = null, float scale = 1f, float depth = 1f) : base(tileSheet, pos, scale, depth) { Animation = animation; }