Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
Player.h
1
#ifndef _BOMBERMAN_ENTITIES_PLAYER_H_
2
#define _BOMBERMAN_ENTITIES_PLAYER_H_
3
4
#include "Entities/Creature.h"
5
6
#include "Core/Animation.h"
7
8
namespace
bomberman
9
{
13
enum class
MovementDirection
14
{
15
None,
16
Up,
17
Down,
18
Left,
19
Right
20
};
26
class
Player
:
public
Creature
27
{
28
public
:
32
Player
(std::shared_ptr<SDL_Texture> texture, SDL_Renderer* renderer);
40
void
setMovementDirection
(MovementDirection direction);
48
virtual
void
update
(
const
unsigned
int
delta)
override
;
49
50
private
:
51
MovementDirection movementDirection = MovementDirection::None;
// movement direction
52
std::shared_ptr<Animation> movement;
// movement animation
53
};
54
}
// namespace bomberman
55
56
#endif
// _BOMBERMAN_ENTITIES_PLAYER_H_
bomberman::Creature
Creature class.
Definition
Creature.h:13
bomberman::Player
Player class.
Definition
Player.h:27
bomberman::Player::setMovementDirection
void setMovementDirection(MovementDirection direction)
Set movement direction of player.
Definition
Player.cpp:23
bomberman::Player::update
virtual void update(const unsigned int delta) override
Tick animations.
Definition
Player.cpp:44
Entities
Player.h
Nicolas Martin
Generated by
1.9.8