BehaviorOverlay class final

What every actor running a behaviour tree last decided, drawn where it stands.

Read-only, and that is the condition for having it at all. It reads the boards through BehaviorBrain.pathOf and goalOf, which never make one, so switching the overlay on cannot change a snapshot — an overlay that did would make a run under the debugger a different run.

Above each actor, one short upright stroke per node on the path, root lowest, coloured by how the node came out: amber running, green success, red failure. A line from the actor to where its running leaf is taking it. Lines cannot carry words, so the names are describe's, for whatever text the game shows beside the picture.

Hand draw to Renderer.addDebugLines.

Constructors

BehaviorOverlay(ActorSystem actors)
An overlay over actors.

Properties

actors → ActorSystem
The actors whose decisions are drawn; read, never written.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

describe() → List<String>
One line per actor running a tree: who, and the path by name — a1: utility › patrol › goTo (running).
draw(DebugDraw lines) → void
Draws, into lines, each living actor's path as strokes above it and a line to its goal. An actor with no body is skipped.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

colorOf(BehaviorStatus status) → LinearColor
The line colour for status, linear: the amber, green and red picked on screen, which the overlay encodes back to exactly those. A status a later release adds is drawn grey until it has a colour of its own.