ForgeDocs
Documentation for the forge framework
|
An entity within the game state that can be queried for information about its current data. More...
Public Member Functions | |
ICollection< DataAccessor > | SelectData (bool includeRemoved=false, Predicate< DataAccessor > filter=null, ICollection< DataAccessor > storage=null) |
Selects data inside of the entity that passes the given filter. More... | |
Data.IData | Current (DataAccessor accessor) |
Gets the current data value for the given type. More... | |
Data.IVersioned | Previous (DataAccessor accessor) |
Gets the previous data value for the data type. More... | |
bool | ContainsData (DataAccessor accessor) |
Checks to see if this Entity contains an instance of the given data type. Keep in mind that an IQueryableEntity contains data one frame after it has been removed; both ContainsData(accessor) and WasRemoved(accessor) can return true. More... | |
Properties | |
string | PrettyName [get, set] |
A non-unique string that represents a "human readable" name for the entity. This carries no weight in the simulation, and is only meant for diagnostics. More... | |
An entity within the game state that can be queried for information about its current data.
bool Forge.Entities.IQueryableEntity.ContainsData | ( | DataAccessor | accessor | ) |
Checks to see if this Entity contains an instance of the given data type. Keep in mind that an IQueryableEntity contains data one frame after it has been removed; both ContainsData(accessor) and WasRemoved(accessor) can return true.
Data.IData Forge.Entities.IQueryableEntity.Current | ( | DataAccessor | accessor | ) |
Gets the current data value for the given type.
Data.IVersioned Forge.Entities.IQueryableEntity.Previous | ( | DataAccessor | accessor | ) |
Gets the previous data value for the data type.
ICollection<DataAccessor> Forge.Entities.IQueryableEntity.SelectData | ( | bool | includeRemoved = false , |
Predicate< DataAccessor > | filter = null , |
||
ICollection< DataAccessor > | storage = null |
||
) |
Selects data inside of the entity that passes the given filter.
includeRemoved | Should data that has been removed, but is still in the queryable entity, be considered for selection? This means that Contains(accessor) will return false but WasRemoved(accessor) will return true. |
filter | The predicate to check items to see if they should be contained inside of the result. |
storage | An optional collection to append result to, instead of creating a new one. The collection will not be cleared by this method. |
|
getset |
A non-unique string that represents a "human readable" name for the entity. This carries no weight in the simulation, and is only meant for diagnostics.