diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-02 17:19:54 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-02 17:19:54 +1000 |
commit | 2386a9534289baf73ce299f33e110f612ff55e38 (patch) | |
tree | 19dca601d4bb7fa0bae23944485ad87024a034ef /source/game/scripting/StarLuaComponents.hpp | |
parent | 73841ee041b8b52f5fde16dc272228704697bcb8 (diff) |
Input Binding support
Diffstat (limited to 'source/game/scripting/StarLuaComponents.hpp')
-rw-r--r-- | source/game/scripting/StarLuaComponents.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/game/scripting/StarLuaComponents.hpp b/source/game/scripting/StarLuaComponents.hpp index f370679..ac18106 100644 --- a/source/game/scripting/StarLuaComponents.hpp +++ b/source/game/scripting/StarLuaComponents.hpp @@ -6,6 +6,7 @@ #include "StarListener.hpp" #include "StarWorld.hpp" #include "StarWorldLuaBindings.hpp" +#include "StarInputLuaBindings.hpp" namespace Star { @@ -282,6 +283,11 @@ void LuaWorldComponent<Base>::init(World* world) { Base::setLuaRoot(world->luaRoot()); Base::addCallbacks("world", LuaBindings::makeWorldCallbacks(world)); + + if (world->isClient()) { + Base::addCallbacks("input", LuaBindings::makeInputCallbacks()); + } + Base::init(); } @@ -289,6 +295,8 @@ template <typename Base> void LuaWorldComponent<Base>::uninit() { Base::uninit(); Base::removeCallbacks("world"); + + Base::removeCallbacks("input"); } template <typename Base> |