Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
Sprite.h
1#ifndef _BOMBERMAN_ENTITIES_SPRITE_H_
2#define _BOMBERMAN_ENTITIES_SPRITE_H_
3
4#include <SDL.h>
5#include <memory>
6#include <vector>
7
8#include "Entities/Object.h"
9
10#include "Core/Animation.h"
11
12namespace bomberman
13{
18 class Sprite : public Object
19 {
20 public:
27 Sprite(std::shared_ptr<SDL_Texture> texture, SDL_Renderer* renderer);
33 void addAnimation(std::shared_ptr<Animation> animation);
39 virtual void update(const unsigned int delta) override;
40
41 private:
42 std::vector<std::shared_ptr<Animation>> animations; // array of animations
43 };
44} // namespace bomberman
45
46#endif // _BOMBERMAN_ENTITIES_SPRITE_H_
Base class for objects.
Definition Object.h:14
Sprite object - for drawable objects.
Definition Sprite.h:19
virtual void update(const unsigned int delta) override
Node update.
Definition Sprite.cpp:31
void addAnimation(std::shared_ptr< Animation > animation)
Add animation to sprite.
Definition Sprite.cpp:26