1#ifndef _BOMBERMAN_CORE_ANIMATION_H_
2#define _BOMBERMAN_CORE_ANIMATION_H_
23 AnimationEntity(
const unsigned int posX,
const unsigned int posY,
const unsigned int w,
25 : positionX(posX), positionY(posY), width(w), height(h){};
27 unsigned int positionX = 0;
28 unsigned int positionY = 0;
29 unsigned int width = 0;
30 unsigned int height = 0;
78 void update(
const unsigned int delta);
82 std::vector<AnimationEntity> animation;
83 unsigned int interval = 100;
84 unsigned int time = 0;
85 bool isPlaying =
false;
86 unsigned int currentEntity = 0;
Animation class.
Definition Animation.h:38
void setAnimationInterval(const unsigned int timeInMs)
Set the Animation Interval to change clipping.
Definition Animation.cpp:24
void update(const unsigned int delta)
Definition Animation.cpp:50
void pause()
pause animation
Definition Animation.cpp:38
void play()
play animation
Definition Animation.cpp:29
void reset()
reset animation and pause
Definition Animation.cpp:43
void setSprite(Sprite *sprite)
Set the Sprite to animation for clipping.
Definition Animation.cpp:12
void addAnimationEntity(AnimationEntity entity)
add entity
Definition Animation.cpp:7
Sprite object - for drawable objects.
Definition Sprite.h:19
Animation part for clipping.
Definition Animation.h:14
AnimationEntity(const unsigned int posX, const unsigned int posY, const unsigned int w, const unsigned int h)
Construct a new Animation Entity object.
Definition Animation.h:23