diff options
author | chai <chaifix@163.com> | 2018-10-24 22:08:46 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-24 22:08:46 +0800 |
commit | d8d7963b9b658799b806d516bbd6b44c4baa28f8 (patch) | |
tree | 4a8c7c247e5c429a4ee50baf3b5be2032575aab6 /src/libjin/Graphics/animation/je_animator.h | |
parent | e98acfb0d497e9c4560554cba73eb5c313ea034a (diff) |
+粒子系统测试
Diffstat (limited to 'src/libjin/Graphics/animation/je_animator.h')
-rw-r--r-- | src/libjin/Graphics/animation/je_animator.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/libjin/Graphics/animation/je_animator.h b/src/libjin/Graphics/animation/je_animator.h new file mode 100644 index 0000000..973ff58 --- /dev/null +++ b/src/libjin/Graphics/animation/je_animator.h @@ -0,0 +1,48 @@ +#ifndef __JE_ANIMATOR_H +#define __JE_ANIMATOR_H + +#include <map> +#include <vector> +#include <string> + +#include "je_animation.h" + +namespace JinEngine +{ + namespace Graphics + { + + /// + /// + /// + class Animator + { + public: + void addAnimation(const std::string& key, Animation* clip); + bool hasKey(const std::string& key); + + void play(); + void switchAnimationByKey(const std::string& key); + void switchAnimation(const Animation* clip); + + /// + /// Control clips. + /// + void stopAnimation(); + void pauseAnimation(); + void rewindAnimation(); + void startAnimation(); + + private: + /// + /// Map a key to clips. + /// + std::map<std::string, Animation*> mAnimations; + Animation* mCurrentAnimation; + + }; + + } // namespace Graphics +} // namespace JinEngine + +#endif
\ No newline at end of file |