Merge remote-tracking branch 'origin/master' into WeaponSystem
# Conflicts: # include/Engine/Collision/FillFrustumOctreeSystem.h # include/Engine/Core/Octree.h # include/Engine/Rendering/RenderSystem.h # include/Game/Game.h # resources/DefaultInput.ini # resources/Schema/Components.xsd # resources/Schema/Entities/Player.xml # resources/Schema/Types/Entity.xsd # src/Engine/Rendering/RenderSystem.cpp # src/Game/Game.cpp # src/Game/Systems/PlayerMovementSystem.cpp
This commit is contained in:
@@ -16,6 +16,15 @@ bool EntityWrapper::HasComponent(const std::string& componentName)
|
||||
return World->HasComponent(ID, componentName);
|
||||
}
|
||||
|
||||
void EntityWrapper::AttachComponent(const char* componentName)
|
||||
{
|
||||
if (!Valid()) {
|
||||
LOG_WARNING("Could not attach \"%s\" component to #%i, entity is not valid.", componentName, ID);
|
||||
return;
|
||||
}
|
||||
World->AttachComponent(ID, componentName);
|
||||
}
|
||||
|
||||
EntityWrapper EntityWrapper::Parent()
|
||||
{
|
||||
if (this->World == nullptr || this->ID == EntityID_Invalid) {
|
||||
|
||||
Reference in New Issue
Block a user