public void splitHeight() { Rectangle rect = new Rectangle { X = 10, Y = 11, Width = 12, Height = 13 }; ISprite split = sprite.split(rect); Assert.AreEqual(13, split.getHeight()); }
public AnimatedSprite createAnimatedSprite(ISprite baseImage, int frames, int delay, bool loop) { Debug.Assert(baseImage != null); Debug.Assert(frames > 0); int frameWidth = baseImage.getWidth() / frames; ISprite[] animation = new ISprite[frames]; for (int i = 0; i < frames; i++) { animation[i] = baseImage.split(i * frameWidth, 0, frameWidth, baseImage.getHeight()); } return(new AnimatedSprite(animation, delay, loop)); }
public void spriteHeight() { Assert.AreEqual(spriteSize, sprite.getHeight()); }
public void splitHeight() { ISprite split = sprite.split(10, 11, 12, 13); Assert.AreEqual(13, split.getHeight()); }