PerformanceMeasureWorld class
A World which measures performance by measureing elapsed time between calls.
Constructors
- PerformanceMeasureWorld(int _framesToMeasure)
- Create the world and define how many frames should be included when calculating the PerformanceStats.
Properties
- componentManager → ComponentManager
-
Returns a manager that takes care of all the components in the world.
no setterinherited
- delta ↔ double
-
The time that passed since the last time process was called.
getter/setter pairinherited
- entityManager → EntityManager
-
Returns a manager that takes care of all the entities in the world.
entities of this world.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
properties
→ Map<
String, Object> -
World-related properties that can be written and read by the user.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
systems
→ Iterable<
EntitySystem> -
Gives you all the systems in this world for possible iteration.
no setterinherited
Methods
-
addComponent<
T extends Component> (int entity, T component) → void -
Adds a
component
to theentity
.inherited -
addComponents<
T extends Component> (int entity, List< T> components) → void -
Adds
components
to theentity
.inherited -
addEntity(
int entity) → void -
Adds a
int entity
to this world.inherited -
addManager(
Manager manager) → void -
Add a manager into this world. It can be retrieved later. World will
notify this manager of changes to entity.
inherited
-
addSystem(
EntitySystem system, {bool passive = false, int group = 0}) → void -
Adds a
system
to this world that will be processed by process(). Ifpassive
is set to true thesystem
will not be processed by the world. If agroup
is set, thissystem
will only be processed when calling process() with the samegroup
.override -
createEntity<
T extends Component> ([List< T> components = const []]) → int -
Create and return a new or reused int instance, optionally with
components
.inherited -
deleteAllEntities(
) → void -
Removes all entities from the world.
inherited
-
deleteEntity(
int entity) → void -
Mark an
entity
for deletion from the world. Will be deleted after the current system finished running.inherited -
deleteManager(
Manager manager) → void -
Deletes the manager from this world.
inherited
-
deleteSystem(
EntitySystem system) → void -
Removed the specified system from the world.
inherited
-
destroy(
) → void -
Destroy the World by destroying all EntitySystems and Managers.
inherited
-
frame(
[int group = 0]) → int -
Returns the current frame/how often the systems in
group
have been processed.inherited -
getComponents(
int entity) → List< Component> -
Get all components belonging to this entity.
inherited
-
getManager<
T extends Manager> () → T -
Returns a Manager of the specified type
T
.inherited -
getPerformanceStats(
) → List< PerformanceStats> - Returns the PerformanceStats for every system and and the PerformanceStats for changes to ints that require updates to other EntitySystems and Managers.
-
getSystem<
T extends EntitySystem> () → T -
Retrieve a system for specified system type.
inherited
-
initialize(
) → void -
Makes sure all managers systems are initialized in the order they were
added.
inherited
-
moveComponent<
T extends Component> (int srcEntity, int dstEntity) → void -
Moves a Component of type
T
from thesrcEntity
to thedstEntity
. if thesrcEntity
does not have the Component of typeT
nothing will happen.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
[int group = 0]) → void -
Processes all changes to entities and executes all non-passive systems.
override
-
removeComponent<
T extends Component> (int entity) → void -
Removes a Component of type
T
from theentity
.inherited -
time(
[int group = 0]) → double -
Returns the time that has elapsed for the systems in the
group
since the game has started (sum of all deltas).inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → Object? -
Returns the value for
key
from properties.inherited -
operator []=(
String key, Object value) → void -
Set the
value
ofkey
in properties.inherited