32 OrbitalModule(uint32_t parentEntityId,
float orbitRadius,
float orbitSpeed,
float startAngle = 0.0f,
Base interface for all ECS components.
Component for entities that orbit around a parent entity (like drones in Isaac).
OrbitalModule(uint32_t parentEntityId, float orbitRadius, float orbitSpeed, float startAngle=0.0f, int damage=10)
Constructor with all orbital parameters.
float _orbitSpeed
Angular velocity (rad/s)
float _currentAngle
Current orbital angle (radians)
uint32_t _parentEntityId
Entity to orbit around.
void setParentEntityId(uint32_t parentEntityId)
Set parent entity ID.
bool _blocksProjectiles
Whether it blocks enemy projectiles.
void setCurrentAngle(float angle)
Set current angle.
uint32_t getParentEntityId() const
Get parent entity ID.
int _damage
Damage dealt on contact.
ComponentType getType() const override
Get the component type ID.
~OrbitalModule() override=default
float getOrbitRadius() const
Get orbit radius.
void setOrbitRadius(float orbitRadius)
Set orbit radius.
void setDamage(int damage)
Set contact damage.
bool blocksProjectiles() const
Check if blocks projectiles.
float getCurrentAngle() const
Get current angle.
float _orbitRadius
Distance from parent (in pixels)
void setOrbitSpeed(float orbitSpeed)
Set orbit speed.
void setBlocksProjectiles(bool blocks)
Set projectile blocking status.
int getDamage() const
Get contact damage.
float getOrbitSpeed() const
Get orbit speed.
Maximum number of distinct component types supported by the Registry.
std::size_t ComponentType
Type alias for component identification.