Added inequality operator to EntityWrapper
This commit is contained in:
@@ -3,11 +3,6 @@
|
||||
|
||||
const EntityWrapper EntityWrapper::Invalid = EntityWrapper(nullptr, EntityID_Invalid);
|
||||
|
||||
bool EntityWrapper::operator==(const EntityWrapper& e) const
|
||||
{
|
||||
return (this->World == e.World) && (this->ID == e.ID);
|
||||
}
|
||||
|
||||
bool EntityWrapper::HasComponent(const std::string& componentName)
|
||||
{
|
||||
return World->HasComponent(ID, componentName);
|
||||
@@ -41,6 +36,16 @@ ComponentWrapper EntityWrapper::operator[](const char* componentName)
|
||||
}
|
||||
}
|
||||
|
||||
bool EntityWrapper::operator==(const EntityWrapper& e) const
|
||||
{
|
||||
return (this->World == e.World) && (this->ID == e.ID);
|
||||
}
|
||||
|
||||
bool EntityWrapper::operator!=(const EntityWrapper& e) const
|
||||
{
|
||||
return !this->operator==(e);
|
||||
}
|
||||
|
||||
EntityWrapper::operator EntityID() const
|
||||
{
|
||||
return this->ID;
|
||||
|
||||
Reference in New Issue
Block a user