ThreeLab/Engine/Components/Component.h
2025-04-01 19:19:53 -05:00

20 lines
431 B
C++

#ifndef COMPONENT_H
#define COMPONENT_H
#include <yaml-cpp/yaml.h>
class Component {
public:
virtual ~Component() {}
// Update the component each frame.
virtual void Update(float deltaTime) = 0;
// Save the component's state to a YAML node.
virtual YAML::Node Save() const = 0;
// Load the component's state from a YAML node.
virtual void Load(const YAML::Node &node) = 0;
};
#endif // COMPONENT_H