Quick Reference
Actions 2
| placeBars() | The bars, placed over each unit's head where the view shows it now (every frame, from the pool). |
| placeForecast() | The selected action's hit chance beside the valid hovered target. |
Updating & Drawing 3
| drawRings3D() | Draws the rings3 d. |
| drawRings2D() | The rings of a 2D map, pooled, in a layer under the characters. |
| update() | Each frame, after the marks: who is marked is read (no more than that), rings are laid again when it changed,… |
Other 3
| collect() | Every unit to mark, into the arrays (U.x, U.y: the middle of its body in tiles; U.ground, U.tall; U.w, U.d: i… |
| track() | Where each marked unit stands now (it may be walking): a few numbers a unit, every frame. |
| covers() | Whether a marked unit (its feet, middle or head) or the cursor's cell is drawn inside a rectangle of the scre… |
Actions
placeBars
static sourceU.placeBars(spriteset, on)
The bars, placed over each unit's head where the view shows it now (every frame, from the pool).
placeForecast
static sourceU.placeForecast(spriteset, on)
The selected action's hit chance beside the valid hovered target.
Updating & Drawing
drawRings3D
static sourceU.drawRings3D(live)
Draws the rings3 d.
drawRings2D
static sourceU.drawRings2D(spriteset, on)
The rings of a 2D map, pooled, in a layer under the characters.
update
static sourceU.update(spriteset)
Each frame, after the marks: who is marked is read (no more than that), rings are laid again when it changed, bars are placed.
Other
collect
static sourceU.collect(fight)
Every unit to mark, into the arrays (U.x, U.y: the middle of its body in tiles; U.ground, U.tall; U.w, U.d: its body; U.team as an index of U.TEAMS; U.hp 0 to 1; U.flags).
Details
Every unit to mark, into the arrays (U.x, U.y: the middle of its body in tiles; U.ground, U.tall; U.w,
U.d: its body; U.team as an index of U.TEAMS; U.hp 0 to 1; U.flags). Read when the battle's
revision moved (someone acted, fell, joined, was hurt): between those only where each stands is read
(U.track). Returns a number that changes when anything a ring shows changed.
track
static sourceU.track()
Where each marked unit stands now (it may be walking): a few numbers a unit, every frame.
Details
Where each marked unit stands now (it may be walking): a few numbers a unit, every frame. Returns the number collect does.
covers
static sourceU.covers(fight, x, y, w, h)
Whether a marked unit (its feet, middle or head) or the cursor's cell is drawn inside a rectangle of the screen (x, y, w, h in game pixels): a HUD panel there would cover it.
Details
Whether a marked unit (its feet, middle or head) or the cursor's cell is drawn inside a rectangle of the
screen (x, y, w, h in game pixels): a HUD panel there would cover it.