7 #ifndef NDK_LUABINDING_HPP 8 #define NDK_LUABINDING_HPP 10 #include <NDK/Entity.hpp> 11 #include <NDK/Lua/LuaBinding_Base.hpp> 18 friend class LuaBinding_SDK;
24 template<
typename T>
void BindComponent(
const Nz::String& name);
26 void RegisterClasses(Nz::LuaState& state);
28 std::unique_ptr<LuaBinding_Base> core;
29 std::unique_ptr<LuaBinding_Base> math;
30 std::unique_ptr<LuaBinding_Base> network;
31 std::unique_ptr<LuaBinding_Base> sdk;
32 std::unique_ptr<LuaBinding_Base> utility;
35 std::unique_ptr<LuaBinding_Base> audio;
36 std::unique_ptr<LuaBinding_Base> graphics;
37 std::unique_ptr<LuaBinding_Base> renderer;
38 std::unique_ptr<LuaBinding_Base> platform;
43 static int AddComponentOfType(Nz::LuaState& lua,
EntityHandle& handle);
46 static int PushComponentOfType(Nz::LuaState& lua,
BaseComponent& component);
48 using AddComponentFunc = int(*)(Nz::LuaState&,
EntityHandle&);
49 using GetComponentFunc = int(*)(Nz::LuaState&,
BaseComponent&);
51 struct ComponentBinding
53 AddComponentFunc adder;
55 GetComponentFunc getter;
59 ComponentBinding* QueryComponentIndex(Nz::LuaState& lua,
int argIndex = 2);
61 std::vector<ComponentBinding> m_componentBinding;
62 std::unordered_map<Nz::String, ComponentIndex> m_componentBindingByName;
66 #include <NDK/Lua/LuaBinding.inl> 68 #endif // NDK_LUABINDING_HPP TODO: For now is unable to display different color in the history, it needs a RichTextDrawer to do so...
Definition: Algorithm.hpp:12
Core class that represents a string.
Definition: String.hpp:22
NDK class that represents the binding between the engine & the SDK with the Lua scripting.
Definition: LuaBinding.hpp:16
NDK class that represents the common base of all components.
Definition: BaseComponent.hpp:17