Editor keyboard shortcuts:

Ctrl+S to save the currently selected entity file (iterates to the base parent)
Ctrl+N to create a new empty entity under the selection
Ctrl+O to import an entity file
Del to delete an entity
This commit is contained in:
2016-01-21 15:58:27 +01:00
parent b9147344e1
commit fc06a4babc
9 changed files with 210 additions and 67 deletions
+5 -1
View File
@@ -10,7 +10,11 @@ bool EntityWrapper::HasComponent(const std::string& componentName)
EntityWrapper EntityWrapper::Parent()
{
return EntityWrapper(World, World->GetParent(ID));
if (this->World == nullptr || this->ID == EntityID_Invalid) {
return EntityWrapper::Invalid;
} else {
return EntityWrapper(this->World, this->World->GetParent(this->ID));
}
}
bool EntityWrapper::Valid()