Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
Creature.h
1#ifndef _BOMBERMAN_ENTITIES_CREATURE_H_
2#define _BOMBERMAN_ENTITIES_CREATURE_H_
3
4#include "Entities/Sprite.h"
5
6namespace bomberman
7{
12 class Creature : public Sprite
13 {
14 public:
18 using Sprite::Sprite;
23 void revertLastMove();
29 void setMoving(bool isMoving);
36 bool isMoving() const;
37
38 protected:
39 // for movement revert
40 float prevPosDeltaX = 0.0f;
41 float prevPosDeltaY = 0.0f;
42
43 private:
44 bool moving = false; // movement status
45 };
46} // namespace bomberman
47
48#endif // _BOMBERMAN_ENTITIES_CREATURE_H_
Creature class.
Definition Creature.h:13
void setMoving(bool isMoving)
Set creature to move.
Definition Creature.cpp:10
void revertLastMove()
Revert last movement of creature.
Definition Creature.cpp:5
bool isMoving() const
Is creature moving at this moment.
Definition Creature.cpp:15
Sprite object - for drawable objects.
Definition Sprite.h:19
Sprite(std::shared_ptr< SDL_Texture > texture, SDL_Renderer *renderer)
Construct a new Sprite object.
Definition Sprite.cpp:5