feat: allow game registering of components
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef DESTRUM_PRINTCOMPONENT_H
|
||||
#define DESTRUM_PRINTCOMPONENT_H
|
||||
#include "destrum/ObjectModel/Component.h"
|
||||
|
||||
class PrintComponent: public Component {
|
||||
public:
|
||||
|
||||
PrintComponent(GameObject& parent);
|
||||
|
||||
std::string GetTypeName() const override { return "PrintComponent"; }
|
||||
void Start() override;
|
||||
void Update(float dt) override;
|
||||
void ImGuiInspector() override;
|
||||
nlohmann::json Serialize() const override;
|
||||
void Deserialize(const nlohmann::json&) override;
|
||||
|
||||
void SetMessage(std::string_view message)
|
||||
{
|
||||
m_message = message;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::string m_message{};
|
||||
|
||||
};
|
||||
|
||||
#endif //DESTRUM_PRINTCOMPONENT_H
|
||||
Reference in New Issue
Block a user