Skip to main content

placements Folder

Files Index

filehelios/engine/runtime/spawn/behavior/placements/_module.ixx

Aggregate module for helios::engine::runtime::spawn::behavior::placements namespace. More...

fileAxisSpawnPlacer.ixx

Spawn placer that arranges entities along an axis. More...

fileColumnSpawnPlacer.ixx

Spawn placer that arranges entities in a vertical column. More...

fileDistributedSpawnPlacer.ixx

Spawn placer that distributes entities across predefined locations. More...

fileEmitterSpawnPlacer.ixx

Placer that spawns entities at the emitter's position. More...

fileRandomSpawnPlacer.ixx

Placer that spawns entities at random positions within bounds. More...

Description

helios::engine::runtime::spawn::behavior::placements

Concrete SpawnPlacer implementations.

Overview

This module provides ready-to-use SpawnPlacer implementations for determining spawn positions.

Key Classes

ClassPurpose
RandomSpawnPlacerPlaces entities at random positions within level bounds
EmitterSpawnPlacerPlaces entities at the emitter's position

Usage

 // Enemies spawn at random locations
 auto enemyProfile = SpawnProfile{
  .gameObjectPoolId = enemyPoolId,
  .spawnPlacer = std::make_unique<RandomSpawnPlacer>(),
  .spawnInitializer = std::make_unique<RandomDirectionInitializer>()
 };
 
 // Projectiles spawn at the firing entity's position
 auto bulletProfile = SpawnProfile{
  .gameObjectPoolId = bulletPoolId,
  .spawnPlacer = std::make_unique<EmitterSpawnPlacer>(),
  .spawnInitializer = std::make_unique<EmitterInitializer>()
 };


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.