Entity class
An Entity is a simple "container" for components.
It serves no purpose apart from being an abstraction container around the components.
- Inheritance
-
- Object
- PoolObject<
String> - Entity
Constructors
- Entity(EntityManager _entityManager)
Properties
- alive ↔ bool
-
Indication if this entity is no longer "in this world".
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int?
-
Internal identifier.
getter/setter pair
- name ↔ String?
-
Optional name to identify an entity by.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add<
T extends Component< (V> , V>[V? data]) → void - Add a component.
-
dispose(
) → void -
Release this object back into the pool.
override
-
get<
T extends Component> () → T? - Retrieves a Component by Type.
-
has<
T extends Component> () → bool - Check if a component is added.
-
init(
[String? name]) → void -
Initialize this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove<
T extends Component> () → void - Remove a component.
-
reset(
) → void -
Reset this object.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited