Namespace in reactor_fight_tactical.js

M

10 functions in 3 groups · hide internal

A Tactical battle on a 2D map.

Quick Reference

Actions 1

placeCost() Each frame: the travelling square moves on, and the cost stands by the destination, where the view shows it n…

Updating & Drawing 5

drawWay3D() Draws the way3 d.
drawWay2D() Draws the way2 d.
update() Update.
draw2D() Draw2 d.
draw3D() Draw3 d.

Other 4

collect() Every cell to mark and its kind, the strongest winning where two overlap; the cursor last.
wayPulse() Where the travelling square is frames after the way was laid, as a place along the way in tiles (0: the unit'…
wayGlow() How bright the travelling square makes tile i when it is at place: 1 on the tile, easing to 0 a tile away eit…
pulseWay() Each frame while a way shows: the travelling square moves on.

Actions

placeCost

static source
M.placeCost(spriteset)

Each frame: the travelling square moves on, and the cost stands by the destination, where the view shows it now.

Updating & Drawing

drawWay3D

static source
M.drawWay3D(live)

Draws the way3 d.

drawWay2D

static source
M.drawWay2D(spriteset, on)

Draws the way2 d.

update

static source
M.update(spriteset)

Update.

draw2D

static source
M.draw2D(spriteset, count)

Draw2 d.

draw3D

static source
M.draw3D(live)

Draw3 d.

Other

collect

static source
M.collect(fight)

Every cell to mark and its kind, the strongest winning where two overlap; the cursor last.

wayPulse

static source
M.wayPulse(frames, count)

Where the travelling square is frames after the way was laid, as a place along the way in tiles (0: the unit's own tile, count - 1: the destination, and on to count, where the destination has dimmed again).

Details

Where the travelling square is frames after the way was laid, as a place along the way in tiles (0: the unit's own tile, count - 1: the destination, and on to count, where the destination has dimmed again). NaN while it rests before the next pass.

wayGlow

static source
M.wayGlow(i, place)

How bright the travelling square makes tile i when it is at place: 1 on the tile, easing to 0 a tile away either side.

pulseWay

static source
M.pulseWay(spriteset)

Each frame while a way shows: the travelling square moves on.

Details

Each frame while a way shows: the travelling square moves on. Nothing is made; with no way it costs a comparison.