Added EntityWrapper::Valid and bool overload to be check if an entity is valid and still exists in the world more easily

This commit is contained in:
2016-01-17 06:20:27 +01:00
parent f281d220de
commit 9f447afbdb
2 changed files with 30 additions and 5 deletions
+4 -2
View File
@@ -23,10 +23,12 @@ struct EntityWrapper
static const EntityWrapper Invalid;
bool HasComponent(const std::string& componentName);
bool Valid();
ComponentWrapper operator[](const std::string& componentName);
ComponentWrapper operator[](const char* componentName);
bool operator==(const EntityWrapper& e);
explicit operator EntityID();
explicit operator EntityID() const;
operator bool();
};
#endif