PYRAMID — Tower Defense
README.md
PyramidVisual
The look of the monument and the plateau it stands on. Attached to the
Pyramid entity by the scene entrypoint at play start.
What it does, in order:
- Materials. The scene is blocked out in flat tints; this puts the authored
surfaces on it — sand on the plateau and dunes, flagstone on the causeway,
honey limestone on the courses, plinths, gate and sphinxes, turquoise faience
on the sockets and bands, granite on the door jambs, weathered gold on the
capstone, and the glowing scarab material on the seal. It finds each thing by
the name
build.luaugave it, so it never needs an entity id. - Courses. One course of the pyramid is one point of stone.
syncCoursesshowscourse_1..course_Nfor the N the player has, hides the rest, and shows the capstone only at full height; it re-runs on everystoneevent frompyramid.state, so spending drops the monument a course in the frame the tower is paid for and earning puts it back. - Carved detail. The door surround (jambs, lintel, gold wing, faience strip), the faience bands on the first and third courses, heads and forepaws on the two sphinxes, and the point light that lights the seal.
- Set and sound. Calls
pyramid.dressing.dressingto build the rubble, braziers, banners and dust, andpyramid.audio.pyramid_audioto start the music, the wind and the stings. It ticks both fromupdate.
Reads pyramid.state; writes nothing to it. Siblings: EnemyDirector,
BuildCursor, GameUi — none required.