Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::ecs::SpawnSettings Struct Reference

Where and how often a RandomSpawner makes entities appear. More...

#include <aegis2d/ecs/spawner.hpp>

Public Attributes

Vec2 from {}
 One end of the spawn line, in logical pixels.
 
Vec2 to {}
 Other end of the spawn line; equal to from for a single spawn point.
 
float min_interval = 1.0F
 Shortest time between two spawns, in seconds; must be above 0.
 
float max_interval = 1.0F
 Longest time between two spawns, in seconds; at least min_interval.
 

Detailed Description

Where and how often a RandomSpawner makes entities appear.

Each spawn is at a random point of the segment from from to to, e.g. a vertical line just beyond the right edge of the screen; the time between two spawns is drawn between min_interval and max_interval.

Member Data Documentation

◆ from

Vec2 aegis2d::ecs::SpawnSettings::from {}

One end of the spawn line, in logical pixels.

◆ max_interval

float aegis2d::ecs::SpawnSettings::max_interval = 1.0F

Longest time between two spawns, in seconds; at least min_interval.

◆ min_interval

float aegis2d::ecs::SpawnSettings::min_interval = 1.0F

Shortest time between two spawns, in seconds; must be above 0.

◆ to

Vec2 aegis2d::ecs::SpawnSettings::to {}

Other end of the spawn line; equal to from for a single spawn point.


The documentation for this struct was generated from the following file: