Package net.sf.gridarta.model.scripts
Interface ScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
- All Known Implementing Classes:
AbstractScriptedEventFactory,DefaultScriptedEventFactory,DefaultScriptedEventFactory,DefaultScriptedEventFactory
public interface ScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>Factory for creatingScriptedEventinstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GnewEventGameObject(int eventType)Return a new event game object for a given event type.@NotNull ScriptedEvent<G,A,R>newScriptedEvent(int eventType, @NotNull java.lang.String pluginName, @NotNull java.lang.String scriptPath, @NotNull java.lang.String options)Creates a newScriptedEventinstance.@NotNull ScriptedEvent<G,A,R>newScriptedEvent(G event)Creates a newScriptedEventinstance.
-
-
-
Method Detail
-
newScriptedEvent
@NotNull @NotNull ScriptedEvent<G,A,R> newScriptedEvent(int eventType, @NotNull @NotNull java.lang.String pluginName, @NotNull @NotNull java.lang.String scriptPath, @NotNull @NotNull java.lang.String options) throws UndefinedEventArchetypeException
Creates 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 @NotNull ScriptedEvent<G,A,R> newScriptedEvent(G event)
Creates a newScriptedEventinstance.- Parameters:
event- the event game object- Returns:
- the new instance
-
newEventGameObject
@NotNull G newEventGameObject(int eventType) throws UndefinedEventArchetypeException
Return a new event game object for a given event type.- Parameters:
eventType- the event type- Returns:
- the new event game object
- Throws:
UndefinedEventArchetypeException- if the event game object cannot be created
-
-