Class ArchetypeSetSpellLoader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>


  • public class ArchetypeSetSpellLoader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    Extract spell definitions from an archetype set.
    • Constructor Detail

      • ArchetypeSetSpellLoader

        public ArchetypeSetSpellLoader​(@NotNull
                                       @NotNull GameObjectFactory<G,​A,​R> gameObjectFactory)
        Creates a new instance.
        Parameters:
        gameObjectFactory - the game object factory for creating game objects
    • Method Detail

      • load

        public void load​(@NotNull
                         @NotNull ArchetypeSet<G,​A,​R> archetypeSet,
                         int typeNo,
                         @NotNull
                         @NotNull Spells<GameObjectSpell<G,​A,​R>> spells)
        Find all game object that describe spells and add corresponding Spell objects.
        Parameters:
        archetypeSet - the archetype set to scan
        typeNo - the type number to search for
        spells - the Spells instance to add the spells to