game.entities.entity_manager

Entity management system.

Classes

EntityManager

Manages all entities in the game.

Module Contents

class game.entities.entity_manager.EntityManager(isometric_map)[source]

Manages all entities in the game.

isometric_map[source]
pigs = [][source]
villagers = [][source]
last_pig_spawn = 0[source]
pig_spawn_accumulator = 0[source]
spawn_pig()[source]

Spawn a new pig at a random valid location.

spawn_villager()[source]

Spawn a new villager at a random valid location.

should_spawn_pig(dt)[source]

Check if a new pig should be spawned.

remove_pig()[source]

Remove one pig (send to another island).

emergency_feast()[source]

Remove half the pigs for emergency feast.

get_pig_count()[source]

Get current number of pigs.

get_villager_count()[source]

Get current number of villagers.

update(dt)[source]

Update all entities.

render(screen)[source]

Render all entities.