Aim2DComponent.ixx File
Component for handling 2D aiming direction. More...
Included Headers
#include <helios.engine.core.data.ComponentTypeId>
#include <helios.math>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.math.types>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | mechanics |
|
High-level gameplay systems and components for game logic. More... | |
| namespace | combat |
|
Combat-related gameplay systems, components, and commands. More... | |
| namespace | components |
|
Combat-specific components for aiming, shooting, and attack tracking. More... | |
Classes Index
| class | Aim2DComponent |
|
Component for handling 2D aiming direction and fire frequency. More... | |
Description
Component for handling 2D aiming direction.
File Listing
The file content with the documentation metadata removed is:
17export namespace helios::engine::mechanics::combat::components {
29 class Aim2DComponent {
36 helios::math::vec2f direction_{0.0f, 0.0f};
41 float frequency_ = 0.0f;
46 bool isEnabled_ = true;
56 return isEnabled_;
63 isEnabled_ = true;
70 isEnabled_ = false;
73 Aim2DComponent() = default;
74 Aim2DComponent(const Aim2DComponent&) = default;
75 Aim2DComponent& operator=(const Aim2DComponent&) = default;
76 Aim2DComponent(Aim2DComponent&&) noexcept = default;
77 Aim2DComponent& operator=(Aim2DComponent&&) noexcept = default;
86 if (freq <= helios::math::EPSILON_LENGTH) {
87 direction_ = {};
88 frequency_ = 0.0f;
90 direction_ = direction;
91 frequency_ = freq;
100 [[nodiscard]] const helios::math::vec2f& direction() const noexcept {
101 return direction_;
110 return frequency_;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.