feat: add basic canvas / improve inspector

This commit is contained in:
2026-10-18 20:42:04 +02:00
parent 7df65f52b5
commit ad16daea7c
47 changed files with 3142 additions and 405 deletions
@@ -0,0 +1,35 @@
#ifndef LIGHTKEEPER_PLAYERRESPAWN_H
#define LIGHTKEEPER_PLAYERRESPAWN_H
#include <glm/vec3.hpp>
#include <destrum/ObjectModel/Component.h>
class PlayerRespawn final : public Component {
public:
explicit PlayerRespawn(GameObject& parent);
std::string GetTypeName() const override { return "PlayerRespawn"; }
void Start() override;
void FixedUpdate(float fixedDt) override;
nlohmann::json Serialize() const override;
void Deserialize(const nlohmann::json& data) override;
void ImGuiInspector() override;
void SetRespawnPoint(const glm::vec3& worldPosition);
[[nodiscard]] const glm::vec3& GetRespawnPoint() const { return m_RespawnPoint; }
void SetKillHeight(float height) { m_KillHeight = height; }
[[nodiscard]] float GetKillHeight() const { return m_KillHeight; }
void Respawn();
private:
glm::vec3 m_RespawnPoint{0.0f};
bool m_HasRespawnPoint{false};
float m_KillHeight{-15.0f};
};
#endif // LIGHTKEEPER_PLAYERRESPAWN_H