Class DefaultScriptedEventFactory
- java.lang.Object
-
- net.sf.gridarta.model.scripts.AbstractScriptedEventFactory<GameObject,MapArchObject,Archetype>
-
- net.sf.gridarta.var.crossfire.model.scripts.DefaultScriptedEventFactory
-
- All Implemented Interfaces:
ScriptedEventFactory<GameObject,MapArchObject,Archetype>
public class DefaultScriptedEventFactory extends AbstractScriptedEventFactory<GameObject,MapArchObject,Archetype>
Implements anAbstractScriptedEventFactoryfor creating Crossfire related instances.
-
-
Constructor Summary
Constructors Constructor Description DefaultScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils, @NotNull java.lang.String subtypeAttribute, @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor, @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ScriptedEvent<GameObject,MapArchObject,Archetype>newScriptedEvent(int eventType, @NotNull java.lang.String pluginName, @NotNull java.lang.String scriptPath, @NotNull java.lang.String options)Creates a newScriptedEventinstance.@NotNull ScriptedEvent<GameObject,MapArchObject,Archetype>newScriptedEvent(GameObject event)Creates a newScriptedEventinstance.-
Methods inherited from class net.sf.gridarta.model.scripts.AbstractScriptedEventFactory
newEventGameObject
-
-
-
-
Constructor Detail
-
DefaultScriptedEventFactory
public DefaultScriptedEventFactory(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull java.lang.String subtypeAttribute, @NotNull @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull @NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor, @NotNull @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)Creates a new instance.- Parameters:
scriptArchUtils- the script arch utils instance to usesubtypeAttribute- the attribute name for the subtype fieldgameObjectFactory- the game object factory for creating game objectsscriptedEventEditor- the scripted event editor to usearchetypeSet- the archetype set to use
-
-
Method Detail
-
newScriptedEvent
@NotNull public @NotNull ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(int eventType, @NotNull @NotNull java.lang.String pluginName, @NotNull @NotNull java.lang.String scriptPath, @NotNull @NotNull java.lang.String options) throws UndefinedEventArchetypeException
Description copied from interface:ScriptedEventFactoryCreates a newScriptedEventinstance.- Parameters:
eventType- type of the eventpluginName- name of the pluginscriptPath- path to the file for this eventoptions- the options for this event- Returns:
- the new instance
- Throws:
UndefinedEventArchetypeException- In case there is no Archetype to create a ScriptedEvent.
-
newScriptedEvent
@NotNull public @NotNull ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(GameObject event)
Description copied from interface:ScriptedEventFactoryCreates a newScriptedEventinstance.- Parameters:
event- the event game object- Returns:
- the new instance
-
-