#include <Pattern.hpp>
◆ Pattern() [1/3]
ECS::Pattern::Pattern |
( |
int |
sizeMapX, |
|
|
int |
sizeMapY, |
|
|
int |
sizeEntityX, |
|
|
int |
sizeEntityY, |
|
|
PatternType |
type = STRAIGHT |
|
) |
| |
|
explicitnoexcept |
It initializes the pattern of the enemy.
- Parameters
-
sizeMapX | the width of the map |
sizeMapY | the height of the map |
sizeEntityX | the width of the entity |
sizeEntityY | The height of the entity |
type | The type of pattern the enemy will follow. |
◆ Pattern() [2/3]
ECS::Pattern::Pattern |
( |
const Pattern & |
pattern | ) |
|
|
defaultnoexcept |
◆ Pattern() [3/3]
ECS::Pattern::Pattern |
( |
Pattern && |
| ) |
|
|
explicitdeletenoexcept |
◆ ~Pattern()
ECS::Pattern::~Pattern |
( |
| ) |
|
|
overridedefaultnoexcept |
◆ changePatternType()
void ECS::Pattern::changePatternType |
( |
PatternType |
type | ) |
|
|
noexcept |
It changes the pattern of the enemy
- Parameters
-
type | The type of pattern to use. |
◆ getFirstPosition()
std::pair< int, int > ECS::Pattern::getFirstPosition |
( |
| ) |
|
|
noexcept |
It returns the first position of the pattern
- Returns
- The first position of the pattern.
◆ getNextPosition()
It returns the next position of the entity according to the pattern
- Parameters
-
speed | the speed of the entity |
pos | the position of the entity |
- Returns
- A pair of int
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following files: