diff --git a/SDK/include/NDK/Entity.hpp b/SDK/include/NDK/Entity.hpp index 3009d1151..93ad73bfe 100644 --- a/SDK/include/NDK/Entity.hpp +++ b/SDK/include/NDK/Entity.hpp @@ -41,6 +41,7 @@ namespace Ndk const EntityHandle& Clone() const; + inline void Disable(); inline void Enable(bool enable = true); inline BaseComponent& GetComponent(ComponentIndex index); diff --git a/SDK/include/NDK/Entity.inl b/SDK/include/NDK/Entity.inl index 89dcf9ae2..4aa497391 100644 --- a/SDK/include/NDK/Entity.inl +++ b/SDK/include/NDK/Entity.inl @@ -2,6 +2,7 @@ // This file is part of the "Nazara Development Kit" // For conditions of distribution and use, see copyright notice in Prerequesites.hpp +#include #include #include #include @@ -27,12 +28,21 @@ namespace Ndk return static_cast(AddComponent(std::move(ptr))); } + /*! + * \brief Disables the entity + * + * This is just a shortcut to Enable(false) + */ + inline void Entity::Disable() + { + Enable(false); + } + /*! * \brief Enables the entity * * \param enable Should the entity be enabled */ - inline void Entity::Enable(bool enable) { if (m_enabled != enable) @@ -323,4 +333,4 @@ namespace std return hash()(id); } }; -} \ No newline at end of file +}