From 34fe5dd4664c22a4f38b6a8adf97330213528977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 8 Feb 2018 16:25:52 +0100 Subject: [PATCH] Fix refresh Lua binding and comments --- SDK/include/NDK/World.hpp | 4 ++-- SDK/src/NDK/Lua/LuaBinding_SDK.cpp | 2 ++ SDK/src/NDK/World.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SDK/include/NDK/World.hpp b/SDK/include/NDK/World.hpp index 83ba86f12..8a0fe2648 100644 --- a/SDK/include/NDK/World.hpp +++ b/SDK/include/NDK/World.hpp @@ -66,11 +66,11 @@ namespace Ndk inline bool IsEntityIdValid(EntityId id) const; inline bool IsProfilerEnabled() const; + void Refresh(); + inline void RemoveAllSystems(); inline void RemoveSystem(SystemIndex index); template void RemoveSystem(); - - void Refresh(); inline void ResetProfiler(); void Update(float elapsedTime); diff --git a/SDK/src/NDK/Lua/LuaBinding_SDK.cpp b/SDK/src/NDK/Lua/LuaBinding_SDK.cpp index e9d7fd9cc..36c28d973 100644 --- a/SDK/src/NDK/Lua/LuaBinding_SDK.cpp +++ b/SDK/src/NDK/Lua/LuaBinding_SDK.cpp @@ -182,7 +182,9 @@ namespace Ndk world.BindMethod("DisableProfiler", &World::DisableProfiler); world.BindMethod("EnableProfiler", &World::EnableProfiler); world.BindMethod("IsProfilerEnabled", &World::IsProfilerEnabled); + world.BindMethod("Refresh", &World::Refresh); world.BindMethod("ResetProfiler", &World::ResetProfiler); + world.BindMethod("Update", &World::Update); world.BindMethod("IsValidHandle", &WorldHandle::IsValid); } diff --git a/SDK/src/NDK/World.cpp b/SDK/src/NDK/World.cpp index 6afb27665..7582461b9 100644 --- a/SDK/src/NDK/World.cpp +++ b/SDK/src/NDK/World.cpp @@ -178,6 +178,7 @@ namespace Ndk * - Destroying dead entities and allowing their ids to be used by newly created entities * - Update dirty entities, destroying their removed components and filtering them along systems * + * \remark This is called automatically by Update and you most likely won't need to call it yourself * \remark Calling this outside of Update will not increase the profiler values * * \see GetProfilerData