StrategyVisuals class final

Constructors

StrategyVisuals({required StrategySimulation simulation, required GraphicsDevice device, int capacity = 4096, int? viewer, Material? ground, Material? units, Material? buildings, Material? unseen, Material? remembered, UnitSize unitSize = const UnitSize(), DeviceMesh? unitMesh, DeviceMesh? buildingMesh, Vector3? buildingMeshSize})
Builds the ground and the batch the crowd is drawn in.

Properties

buildings → Iterable<MeshNode>
The building nodes drawn so far, in the order they were drawn.
no setter
crowd → InstancedMeshNode
The batch the crowd is drawn in, for a game that wants to tint or hide it and for a test that wants to read a transform back.
no setter
hashCode → int
The hash code for this object.
no setterinherited
remembered → InstancedMeshNode?
The tiles over ground viewer has seen and cannot see now.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
simulation → StrategySimulation
What is drawn.
final
unitSize → UnitSize
How big a unit is drawn.
final
unseen → InstancedMeshNode?
The tiles over ground viewer has never seen, or null for a spectator.
no setter
viewer → int?
Whose view this is, or null for a view belonging to nobody.
final

Methods

addTo(Scene scene) → void
Puts the ground, the crowd and the fog into scene, and keeps it for the buildings that arrive later.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sync() → void
Brings the picture up to date with the simulation.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited