public Waiting() { var waitingFrames = new IAnimationFrame[] { new AnimationFrame(new FrameInformation(118, 6, 32, 39), 500), new AnimationFrame(new FrameInformation(231, 6, 32, 39), 500) }; var fallingAsleepFrames = new IAnimationFrame[] { new AnimationFrame(new FrameInformation(192, 6, 32, 39), 500), new AnimationFrame(new FrameInformation(271, 6, 32, 39), 500) }; var sleepingFrame = new FrameInformation(81, 6, 31, 39); var wakeUpFrame = new FrameInformation(157, 6, 32, 39); _animation = new Animation(new IAnimationFrame[] { new LimitedAnimation(waitingFrames, 10), new LimitedAnimation(fallingAsleepFrames, 10), new AnimationFrame(sleepingFrame, 3000), new AnimationFrame(wakeUpFrame, 500) }); }
public AnimationFrame(FrameInformation information, int totalMilliseconds) { FrameInformation = information; TotalMilliseconds = totalMilliseconds; _millisecondsUntilNextFrame = totalMilliseconds; }
public Animation(FrameInformation source) { _frames = new IAnimationFrame[] { new AnimationFrame(source, 0) }; }
public Animation(FrameInformation source) { _frames = new IAnimationFrame[] { new AnimationFrame(source, 0) }; }
public AnimationFrame(FrameInformation information, int totalMilliseconds) { FrameInformation = information; TotalMilliseconds = totalMilliseconds; _millisecondsUntilNextFrame = totalMilliseconds; }