#pragma once #include "Component.hpp" /** * Handles gravity well behavior for both hazards and player-spawned black holes. */ struct GravityWellComponent : public Component { /** * Mass of the gravity well, affecting the strength of the gravitational pull on receivers. */ float mass = 150000.0f; /** * Minimum distance for gravity pull calculations to avoid singularities and excessive forces * when very close to receivers. */ float minDist = 30.0f; /** * Whether the gravity source is currently active and should apply gravitational force. */ bool active = false; /** * If true, this component is used as the player input controller. */ bool controlledByMouse = true; /** * If true and not mouse-controlled, this well applies gravity every frame. */ bool alwaysActive = false; /** * Meter cost paid to place one player black hole. */ float placementCost = 10.0f; /** * Lifetime in seconds for each player-placed black hole. */ float placementTtl = 1.0f; void Setup() override; void Update(float dt) override; void Cleanup() override; };