Documentation for module 'NDK'
Former-commit-id: 63e1cac538c577a1f1aafa71fa7eef69a6d4daab [formerly b2d8769fd02a0e7d9c476d4ad7be1988a1fd6789] [formerly 636b5cb79bcb8da44d9aa45ba1023565bcf29f0d [formerly a2361ec2b8679d4d4ba096e543b5d4b91825dd62]] Former-commit-id: d402d35477f9db0135c553d55c401939426bf62d [formerly 607336ea0f42731e4604f3a8c2df06f3aecfc401] Former-commit-id: 69e23cd6c06723486de5e4641ce810012dac66da
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
/*!
|
||||
* \brief Binds a component to a name
|
||||
*
|
||||
* \param name Name used to retrieve the component
|
||||
*
|
||||
* \remark Produces a NazaraAssert if name is empty
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
void LuaBinding::BindComponent(const Nz::String& name)
|
||||
{
|
||||
@@ -24,6 +32,16 @@ namespace Ndk
|
||||
m_componentBindingByName[name] = T::componentIndex;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Adds a component to an entity
|
||||
* \return 1 in case of success
|
||||
*
|
||||
* \param instance Lua instance that will interact with the component
|
||||
* \param handle Entity which component will be added to
|
||||
*
|
||||
* \remark T must be a subtype of BaseComponent
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
int AddComponentOfType(Nz::LuaInstance& lua, EntityHandle& handle)
|
||||
{
|
||||
@@ -34,6 +52,16 @@ namespace Ndk
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Pushes a component
|
||||
* \return 1 in case of success
|
||||
*
|
||||
* \param instance Lua instance that will interact with the component
|
||||
* \param component Component that will be pushed
|
||||
*
|
||||
* \remark T must be a subtype of BaseComponent
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
int PushComponentOfType(Nz::LuaInstance& lua, BaseComponent& component)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user