From 246c683cd6ef7e6f02ee11b7dac75c3f59c19052 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sun, 24 Jan 2021 02:15:15 +0100 Subject: [PATCH] Add lua component --- inferno/src/inferno/scene/components.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inferno/src/inferno/scene/components.h b/inferno/src/inferno/scene/components.h index 3358cfe..229ed0c 100644 --- a/inferno/src/inferno/scene/components.h +++ b/inferno/src/inferno/scene/components.h @@ -15,6 +15,8 @@ namespace Inferno { + class Lua; + struct TagComponent { std::string tag; @@ -80,6 +82,16 @@ namespace Inferno { } }; + struct LuaScriptComponent { + Lua* instance = nullptr; + std::string path; + + // Dont allow manually setting instance during construction + LuaScriptComponent() {} + LuaScriptComponent(const std::string& path) + : path(path) {} + }; + // ---------------------------------------- const LogStream& operator<<(const LogStream& stream, const TransformComponent& value);