Files
NazaraEngine/SDK/include/NDK/Components/NodeComponent.inl
Lynix df8da275c4 Switch from Nz prefix to namespace Nz
What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
2015-09-25 19:20:05 +02:00

22 lines
579 B
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <Nazara/Core/Error.hpp>
#include <NDK/Entity.hpp>
namespace Ndk
{
inline void NodeComponent::SetParent(Entity* entity, bool keepDerived)
{
if (entity)
{
NazaraAssert(entity->HasComponent<NodeComponent>(), "Entity must have a NodeComponent");
Nz::Node::SetParent(entity->GetComponent<NodeComponent>(), keepDerived);
}
else
Nz::Node::SetParent(nullptr, keepDerived);
}
}