The Destroyable struct indicates whether an entity can be destroyed in the game, providing a simple flag for systems to check before executing destruction logic.
namespace component {
struct Destroyable {
bool _destroyable;
};
}; // namespace component
- Members:
bool _destroyable:A boolean value that specifies if the entity is destroyable (true) or not (false).
The Destroyable component is crucial for managing entity lifecycle events, allowing systems to quickly determine which objects can be removed from the game world.