Skip to content

Commit

Permalink
Add id() method to Entity class
Browse files Browse the repository at this point in the history
Mostly for internal use. May be exposed to scripts at a later
date.
  • Loading branch information
bkloster committed May 18, 2013
1 parent f8cca45 commit fa2d7ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engine/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ Entity::hasComponent(
}


EntityId
Entity::id() const {
return m_impl->m_id;
}


void
Entity::removeComponent(
Component::TypeId typeId
Expand Down
6 changes: 6 additions & 0 deletions src/engine/entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ class Entity {
const std::string& typeName
);

/**
* @brief The entity's id
*/
EntityId
id() const;

/**
* @brief Removes a component by type id
*
Expand Down

0 comments on commit fa2d7ee

Please sign in to comment.