void TransformSystem::commit_transform(TransformComponent& transform) { if (transform.mobility != Mobility::Dynamic) { throw InvalidOperation("TransformComponent is not dynamic"); } const ComponentId id = transform.id(); _committed_transform_ids.push_back(id); }
void TransformSystem::on_component_removed(TransformComponent& transform) { // Remove the transform from the committed transform vector _committed_transform_ids.erase(std::remove(_committed_transform_ids.begin(), _committed_transform_ids.end(), transform.id()), _committed_transform_ids.end()); }