8 #ifndef SPRITEANIMATION_HPP_
9 #define SPRITEANIMATION_HPP_
11 #include "KapEngine.hpp"
12 #include "KapEngineDebug.hpp"
13 #include "KapEngineUi.hpp"
23 void onPlay()
override;
24 void onUpdateAnim()
override;
25 void onResetAnim()
override;
26 void setNbAnimations(
int nbAnimations, std::size_t xAnims = 0, std::size_t yAnims = 0);
35 if (bounce && !_bounce)
37 if (!bounce && _bounce)
42 void reverseAnim(
bool reverse) { _reverse = reverse; }
44 void setChangeWithY(
bool changeWithY) { _changeWithY = changeWithY; }
51 bool _reverse =
false;
52 bool _changeWithY =
false;
54 std::size_t _nbXTextures;
55 std::size_t _nbYTextures = 0;
57 void init(std::shared_ptr<KapEngine::GameObject> gameObject);