SDK/Lua: Bind HasComponent method
This commit is contained in:
parent
6759abc878
commit
d4532ce7ff
|
|
@ -103,6 +103,14 @@ namespace Ndk
|
|||
return bindingComponent->adder(state, handle);
|
||||
});
|
||||
|
||||
entity.BindMethod("HasComponent", [this](Nz::LuaState& state, EntityHandle& handle, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
LuaBinding::ComponentBinding* bindingComponent = m_binding.QueryComponentIndex(state);
|
||||
|
||||
state.PushBoolean(handle->HasComponent(bindingComponent->index));
|
||||
return 1;
|
||||
});
|
||||
|
||||
entity.BindMethod("GetComponent", [this] (Nz::LuaState& state, EntityHandle& handle, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
LuaBinding::ComponentBinding* bindingComponent = m_binding.QueryComponentIndex(state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue