diff options
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -88,3 +88,12 @@ game_create_entity(Game *this) this->uuid += 1; return e; } + +int +game_entity_count(Game *this, unsigned int type) +{ + int count = 0; + for (int i = 0; i < MAX_ENTITIES; i++) + count += (this->entities[i].type == type); + return count; +} |