public class DefaultScriptedEventFactory extends AbstractScriptedEventFactory<GameObject,MapArchObject,Archetype>
AbstractScriptedEventFactory for creating Crossfire
related instances.| Constructor and Description |
|---|
DefaultScriptedEventFactory(ScriptArchUtils scriptArchUtils,
java.lang.String subtypeAttribute,
GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory,
ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor,
ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
GameObject |
newEventGameObject(int eventType)
Return a new event game object for a given event type.
|
ScriptedEvent<GameObject,MapArchObject,Archetype> |
newScriptedEvent(GameObject event)
Creates a new
ScriptedEvent instance. |
ScriptedEvent<GameObject,MapArchObject,Archetype> |
newScriptedEvent(int eventType,
java.lang.String pluginName,
java.lang.String scriptPath,
java.lang.String options)
Creates a new
ScriptedEvent instance. |
public 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)
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@NotNull public ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(int eventType, @NotNull java.lang.String pluginName, @NotNull java.lang.String scriptPath, @NotNull java.lang.String options) throws UndefinedEventArchetypeException
ScriptedEvent instance.eventType - type of the eventpluginName - name of the pluginscriptPath - path to the file for this eventoptions - the options for this eventUndefinedEventArchetypeException - In case there is no Archetype to
create a ScriptedEvent.@NotNull public ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(GameObject event)
ScriptedEvent instance.event - the event game object@NotNull public GameObject newEventGameObject(int eventType) throws UndefinedEventArchetypeException
newEventGameObject in interface ScriptedEventFactory<GameObject,MapArchObject,Archetype>newEventGameObject in class AbstractScriptedEventFactory<GameObject,MapArchObject,Archetype>eventType - the event typeUndefinedEventArchetypeException - if the event game object cannot
be created