feat: add basic canvas / improve inspector
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef LIGHTKEEPER_CHECKPOINT_H
|
||||
#define LIGHTKEEPER_CHECKPOINT_H
|
||||
|
||||
#include <glm/vec3.hpp>
|
||||
|
||||
#include <destrum/ObjectModel/Component.h>
|
||||
|
||||
class Checkpoint final : public Component {
|
||||
public:
|
||||
explicit Checkpoint(GameObject& parent);
|
||||
|
||||
std::string GetTypeName() const override { return "Checkpoint"; }
|
||||
|
||||
void OnTriggerEnter(GameObject* other) override;
|
||||
|
||||
nlohmann::json Serialize() const override;
|
||||
void Deserialize(const nlohmann::json& data) override;
|
||||
void ImGuiInspector() override;
|
||||
|
||||
void SetSpawnOffset(const glm::vec3& offset) { m_SpawnOffset = offset; }
|
||||
[[nodiscard]] glm::vec3 GetSpawnPoint() const;
|
||||
|
||||
private:
|
||||
glm::vec3 m_SpawnOffset{0.0f};
|
||||
};
|
||||
|
||||
#endif // LIGHTKEEPER_CHECKPOINT_H
|
||||
Reference in New Issue
Block a user