diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-10 00:51:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-26 23:35:59 +0300 |
commit | 5fe07db8992b924069c4c358e557e88d2493f85f (patch) | |
tree | 8d959a23a5f8dde22e4f208d1bbf5665ee5068f7 /src/animatedsprite.h | |
parent | 1cf2a378e64315d4ddf7e10f115e96d86365c3f8 (diff) | |
download | plus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.gz plus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.bz2 plus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.xz plus-5fe07db8992b924069c4c358e557e88d2493f85f.zip |
add basic animation unit tests.
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r-- | src/animatedsprite.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 5a7dbde56..60df2f6e4 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -107,6 +107,23 @@ class AnimatedSprite final : public Sprite static void setEnableCache(const bool b) { mEnableCache = b; } +#ifdef UNITTESTS + SpriteDef *getSprite() + { return mSprite; } + + Frame *getFrame() + { return mFrame; } + + Animation *getAnimation() + { return mAnimation; } + + unsigned int getFrameIndex() + { return mFrameIndex; } + + unsigned int getFrameTime() + { return mFrameTime; } +#endif + private: bool updateCurrentAnimation(const unsigned int dt); |