Move2DConfig Class
Fluent configuration for 2D movement behavior. More...
Declaration
Public Constructors Index
| Move2DConfig (helios::engine::ecs::GameObject gameObject) | |
|
Constructs a Move2DConfig and adds required components. More... | |
Public Member Functions Index
| Move2DConfig & | speed (const float movementSpeed) |
|
Sets the maximum movement speed. More... | |
| Move2DConfig & | acceleration (const float movementAcceleration) |
|
Sets the movement acceleration rate. More... | |
| Move2DConfig & | instantAcceleration (const bool useInstantAcceleration) |
|
Enables or disables instant acceleration. More... | |
Private Member Attributes Index
| helios::engine::ecs::GameObject | gameObject_ |
|
Non-owning pointer to the target GameObject. More... | |
Description
Fluent configuration for 2D movement behavior.
Automatically adds required components:
- Move2DComponent
- ComposeTransformComponent
- DirectionComponent
- TranslationStateComponent
Definition at line 24 of file Move2DConfig.ixx.
Public Constructors
Move2DConfig()
| inline explicit |
Constructs a Move2DConfig and adds required components.
- Parameters
-
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a> Target GameObject to configure.
Definition at line 38 of file Move2DConfig.ixx.
Referenced by acceleration, instantAcceleration and speed.
Public Member Functions
acceleration()
| inline |
Sets the movement acceleration rate.
- Parameters
-
movementAcceleration Acceleration in units per second squared.
- Returns
Reference to this config for chaining.
Definition at line 69 of file Move2DConfig.ixx.
Reference Move2DConfig.
instantAcceleration()
| inline |
Enables or disables instant acceleration.
When enabled, the entity reaches max speed immediately.
- Parameters
-
useInstantAcceleration True for instant acceleration.
- Returns
Reference to this config for chaining.
Definition at line 85 of file Move2DConfig.ixx.
Reference Move2DConfig.
speed()
| inline |
Sets the maximum movement speed.
- Parameters
-
movementSpeed Speed in units per second.
- Returns
Reference to this config for chaining.
Definition at line 55 of file Move2DConfig.ixx.
Reference Move2DConfig.
Private Member Attributes
gameObject_
|
Non-owning pointer to the target GameObject.
Definition at line 29 of file Move2DConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.