Basic movement and camera management between players and editor

This commit is contained in:
2016-01-22 16:12:51 +01:00
parent 1e3fc1ae2d
commit ca2aab449e
24 changed files with 499 additions and 176 deletions
+16
View File
@@ -17,6 +17,22 @@ EntityWrapper EntityWrapper::Parent()
}
}
EntityWrapper EntityWrapper::FirstChildByName(const std::string& name)
{
auto itPair = this->World->GetChildren(this->ID);
if (itPair.first == itPair.second) {
return EntityWrapper::Invalid;
}
for (auto it = itPair.first; it != itPair.second; ++it) {
if (this->World->GetName(it->second) == name) {
return EntityWrapper(this->World, it->second);
}
}
return EntityWrapper::Invalid;
}
bool EntityWrapper::Valid()
{
if (this->World == nullptr) {