#include <spawner.h>
Public Member Functions | |
| Spawner (int, int, int, EnemyType) | |
| bool | should_spawn () |
| Enemy * | spawn_creep (int chunk_x, int chunk_y) |
| int | get_x () |
| int | get_y () |
| int | get_depth () |
Protected Attributes | |
| int | x |
| int | y |
| int | depth |
| EnemyType | enemy |
A class responsible for creating enemies. This class spawns enemies at a given location. Each spawner only spawns one type of enemy.
| int Spawner::get_depth | ( | ) |
Public accessor for the depth.
| int Spawner::get_x | ( | ) |
Public accessor for the member x.
| int Spawner::get_y | ( | ) |
Public accessor for the member y.
| Enemy * Spawner::spawn_creep | ( | int | chunk_x, |
| int | chunk_y | ||
| ) |
Spawns a new enemy.
| chunk_x | The x component of the chunk where the enemy should spawn. |
| chunk_y | The y component of the chunk where the enemey should spawn. |
|
protected |
Depth of the spawner in the chunk.
|
protected |
The type of enemy to spawn.
|
protected |
X coordinate of the spawner.
|
protected |
Y coordinate of the spawner.
1.8.8