Facade for Sprite Enchantment
Provide a unified, simple sigil to command complex underlying rendering subsystems.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Abjuration // Sprite Enchantment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
function EnchantmentFacade() constructor {
shader_sys = new ShaderSubsystem();
particle_sys = new ParticleSubsystem();
blend_sys = new BlendSubsystem();
static ignite_sprite = function(_target) {
shader_sys.apply_flame_distortion();
blend_sys.set_additive();
particle_sys.emit_sparks(_target.x, _target.y);
_target.draw_self();
blend_sys.reset();
shader_sys.reset();
};
}
The Facade obscures the horrifying complexities of shaders, particle matrices, and GPU blend states behind a single, elegant incantation. Apprentices need only call ignite_sprite to summon the inferno.
Runic Tags:
#gml
#structural
#facade