29 lines
642 B
C++
29 lines
642 B
C++
#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
|