Package net.sf.gridarta.model.scripts
Class AbstractScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.scripts.AbstractScriptedEventFactory<G,A,R>
-
- All Implemented Interfaces:
ScriptedEventFactory<G,A,R>
- Direct Known Subclasses:
DefaultScriptedEventFactory,DefaultScriptedEventFactory,DefaultScriptedEventFactory
public abstract class AbstractScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements ScriptedEventFactory<G,A,R>
Abstract base class forScriptedEventFactoryimplementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils, @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull ArchetypeSet<G,A,R> archetypeSet)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GnewEventGameObject(int eventType)Return a new event game object for a given event type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.model.scripts.ScriptedEventFactory
newScriptedEvent, newScriptedEvent
-
-
-
-
Constructor Detail
-
AbstractScriptedEventFactory
protected AbstractScriptedEventFactory(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet)Creates a new instance.- Parameters:
scriptArchUtils- the script arch utils instance to usegameObjectFactory- the game object factory for creating game objectsarchetypeSet- the archetype set to use
-
-
Method Detail
-
newEventGameObject
@NotNull public G newEventGameObject(int eventType) throws UndefinedEventArchetypeException
Description copied from interface:ScriptedEventFactoryReturn a new event game object for a given event type.- Specified by:
newEventGameObjectin interfaceScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
eventType- the event type- Returns:
- the new event game object
- Throws:
UndefinedEventArchetypeException- if the event game object cannot be created
-
-