Antkeeper  0.0.1
Functions
spawn.hpp File Reference
#include "game/game.hpp"
#include "game/ant/ant-genome.hpp"
#include <engine/math/vector.hpp>

Go to the source code of this file.

Functions

entity::id spawn_ant_egg (::game &ctx, const ant_genome &genome, bool fertilized, const math::fvec3 &position)
 Spawns an ant egg. More...
 
entity::id spawn_ant_larva (::game &ctx, const ant_genome &genome, const math::fvec3 &position)
 Spawns an ant larva. More...
 
entity::id spawn_worker_ant (::game &ctx, const ant_genome &genome, const math::fvec3 &position)
 Spawns a worker ant. More...
 

Function Documentation

◆ spawn_ant_egg()

entity::id spawn_ant_egg ( ::game ctx,
const ant_genome genome,
bool  fertilized,
const math::fvec3 position 
)

Spawns an ant egg.

Parameters
ctxGame context.
genomeAnt genome.
fertilizedWhether the egg has been fertilized.
positionPosition at which to spawn an egg.
Returns
Entity ID of the spawned ant egg.

Definition at line 25 of file spawn.cpp.

◆ spawn_ant_larva()

entity::id spawn_ant_larva ( ::game ctx,
const ant_genome genome,
const math::fvec3 position 
)

Spawns an ant larva.

Parameters
ctxGame context.
genomeAnt genome.
positionPosition at which to spawn an larva.
Returns
Entity ID of the spawned ant larva.

Definition at line 43 of file spawn.cpp.

◆ spawn_worker_ant()

entity::id spawn_worker_ant ( ::game ctx,
const ant_genome genome,
const math::fvec3 position 
)

Spawns a worker ant.

Parameters
ctxGame context.
genomeAnt genome.
positionPosition at which to spawn a worker ant.
Returns
Entity ID of the spawned worker ant.

Definition at line 61 of file spawn.cpp.