GameObjectFactory Class
Factory class for creating and cloning GameObjects. More...
Declaration
Public Static Functions Index
| static GameObjectFactory & | instance () |
|
Returns the singleton instance of the factory. More... | |
| static GameObjectPrototype | gameObject (helios::engine::runtime::world::GameWorld &gameWorld) |
|
Creates a new empty GameObject prototype. More... | |
Description
Factory class for creating and cloning GameObjects.
Provides static methods for constructing new GameObjects or creating copies from existing templates. Uses the builder pattern internally via `GameObjectPrototype` for fluent component configuration.
Example usage: ```cpp auto player = GameObjectFactory::gameObject() .withMotion([](auto& m) { m.move2D().speed(5.0f); }) .withRendering([&](auto& r) { r.renderable().shape(shape).shader(shader).build(); }) .make(true); ```
Definition at line 41 of file GameObjectFactory.ixx.
Public Static Functions
gameObject()
| inline static |
Creates a new empty GameObject prototype.
- Parameters
-
gameWorld The world where the GameObject lives.
- Returns
A prototype for fluent configuration.
Definition at line 392 of file GameObjectFactory.ixx.
instance()
| inline static |
Returns the singleton instance of the factory.
- Returns
Reference to the singleton factory.
Definition at line 380 of file GameObjectFactory.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.