SpawnCommand Class
Command to request spawning of GameObjects from a pool. More...
Declaration
Public Constructors Index
| SpawnCommand (const SpawnProfileId spawnProfileId, const SpawnContext &spawnContext, const size_t spawnBudget=1) | |
|
Constructs a SpawnCommand. More... | |
Public Member Functions Index
| SpawnProfileId | spawnProfileId () const noexcept |
|
Returns the target pool ID. More... | |
| size_t | spawnBudget () const noexcept |
|
Returns the spawn budget. More... | |
| SpawnContext | spawnContext () const noexcept |
|
Returns the spawn context. More... | |
Private Member Attributes Index
| size_t | spawnBudget_ |
|
The number of GameObjects to spawn. More... | |
| SpawnProfileId | spawnProfileId_ |
|
Profile identifying the spawn configuration. More... | |
| SpawnContext | spawnContext_ |
|
Context providing spawn-time information (e.g., emitter). More... | |
Description
Command to request spawning of GameObjects from a pool.
SpawnCommand is a WorldCommand that requests the activation of GameObjects from a specific pool. The command carries a spawn budget indicating how many objects should be spawned.
The command itself does not execute spawning directly. Instead, it is dispatched to a SpawnCommandDispatcher which forwards the command to the appropriate SpawnManager for deferred processing.
- See Also
SpawnCommandDispatcher
- See Also
- See Also
GameObjectSpawnSystem
Definition at line 36 of file SpawnCommand.ixx.
Public Constructors
SpawnCommand()
| inline explicit |
Constructs a SpawnCommand.
- Parameters
-
spawnProfileId The profile identifying the spawn configuration.
spawnContext Context providing spawn-time information.
spawnBudget Number of objects to spawn (default: 1).
Definition at line 62 of file SpawnCommand.ixx.
References spawnBudget, spawnContext and spawnProfileId.
Public Member Functions
spawnBudget()
| inline nodiscard noexcept |
Returns the spawn budget.
- Returns
The number of objects to spawn.
Definition at line 87 of file SpawnCommand.ixx.
Referenced by SpawnCommand.
spawnContext()
| inline nodiscard noexcept |
Returns the spawn context.
- Returns
The spawn context of this command.
Definition at line 96 of file SpawnCommand.ixx.
Referenced by SpawnCommand.
spawnProfileId()
| inline nodiscard noexcept |
Returns the target pool ID.
- Returns
The GameObjectPoolId to spawn from.
Definition at line 78 of file SpawnCommand.ixx.
Referenced by SpawnCommand.
Private Member Attributes
spawnBudget_
|
The number of GameObjects to spawn.
Definition at line 41 of file SpawnCommand.ixx.
spawnContext_
|
Context providing spawn-time information (e.g., emitter).
Definition at line 51 of file SpawnCommand.ixx.
spawnProfileId_
|
Profile identifying the spawn configuration.
Definition at line 46 of file SpawnCommand.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.