Chione::
Entity class
| Superclass | Object |
| Included Modules |
The Entity (identity) class
Attributes
- id R
The Entity’s ID
- world R
The World the
Entitybelongs to
Public Class Methods
Return an ID for an Entity.
Create a new Entity for the specified world, and use the specified id if given. If no id is given, one will be automatically generated.
Public Instance Methods
Equality operator – returns true if the receiver and other belong to the same world, have the same ID, and have equal components.
Add the specified component to the entity. The component can be a subclass of Chione::Component, an instance of such a subclass, or the name of a subclass. It will replace any existing component of the same type.
Return the components that the entity’s World has registered for it as a Hash keyed by the Component class.
Fetch the component of the specified component_class that corresponds with the receiving entity. Returns nil if so much component exists.
Returns true if this entity has a component of the specified component_class.
Remove the component of the specified component_class that corresponds with the receiving entity. Returns the component instance if it was removed, or nil if no Component of the specified type was registered to the entity.
Protected Instance Methods
Return the detailed part of the Entity’s #inspect output