Abstract Factory for Sprite Enchantment
Conjure families of related sprite enchantments without knowing their concrete forms.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Sprite Enchantment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
function EnchantmentFactory() constructor {
static create_aura = function() {};
static create_trail = function() {};
}
function FlameEnchantmentFactory() : EnchantmentFactory() constructor {
static create_aura = function() { return new FlameAura(); };
static create_trail = function() { return new FlameTrail(); };
}
function VoidEnchantmentFactory() : EnchantmentFactory() constructor {
static create_aura = function() { return new VoidAura(); };
static create_trail = function() { return new VoidTrail(); };
}
Through the Abstract Factory, an illusionist dictates the elemental affinity of their sprite manifestations globally, weaving cohesive visual effects without hardcoding the elemental incantations into every rendering routine.
Runic Tags:
#gml
#creational
#sprite-enchantment