PYRAMID — Tower Defense
README.md
Enemy
One of the dead. The EnemyDirector spawns an entity per body and attaches this
component to it; from there the body carries its own life.
- Walks the causeway on the exact curve
pyramid.rules.pointAtdraws the road with, offset sideways bylane, and turns to face that curve's heading. - Publishes an
EnemyRecordintopyramid.state(progresskept live in metres along the path) and fills the record'shitandtakeLeak, so a tower hurts it throughState.damageEnemywithout knowing what an enemy is. - Dies into dust, pays
rules.ENEMIES[kind].bountystone throughState.gainand emits akillevent with its position. - On reaching the seal, emits
leak, thenState.shatter(leak), which is what takes courses off the pyramid.
kind picks the body's size, speed, health and tone out of rules.ENEMIES:
husk, scarab, guard, colossus.
The body is chiselled from primitives in one unit (feet at y = 0, facing +Z,
2.6 m to the ear tips), scaled by the kind's scale: a black jackal-headed
bandage-wrapped raider with a tarnished gold collar, a turquoise scarab amulet
and a bronze khopesh. That build is the slot a generated wraith mesh replaces;
nothing else about the body depends on it.
Attaches to a bare entity the director creates at runtime. Needs pyramid.rules
and pyramid.state, and the standard lit material for its blocks.