Package net.sf.gridarta.model.scripts
Class DefaultScriptArchData<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.scripts.DefaultScriptArchData<G,A,R>
-
- All Implemented Interfaces:
ScriptArchData<G,A,R>
public class DefaultScriptArchData<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements ScriptArchData<G,A,R>
Stores and manages information about scripted events. This data is only needed for those arches with one or more events defined.- XXX:
- This class is designed very badly, as it combines model and presentation.
-
-
Constructor Summary
Constructors Constructor Description DefaultScriptArchData(@NotNull java.lang.String subtypeAttribute, int eventTypeNo)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GgetScriptedEvent(int eventSubtype, G gameObject)Search the owner game object for an event object of the specified event type.booleanisEmpty(G gameObject)Returns whether this ScriptArchData is empty (contains no events).
-
-
-
Method Detail
-
getScriptedEvent
@Nullable public G getScriptedEvent(int eventSubtype, @NotNull G gameObject)
Description copied from interface:ScriptArchDataSearch the owner game object for an event object of the specified event type.- Specified by:
getScriptedEventin interfaceScriptArchData<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
eventSubtype- look for a ScriptedEvent of this typegameObject- the game object to operate on- Returns:
- the event game object, or
nullif no event of this type exists
-
isEmpty
public boolean isEmpty(@NotNull G gameObject)Description copied from interface:ScriptArchDataReturns whether this ScriptArchData is empty (contains no events). (Note that empty ScriptArchData objects always are removed ASAP.)- Specified by:
isEmptyin interfaceScriptArchData<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
gameObject- the game object to operate on- Returns:
trueif this ScriptArchData contains no events, otherwisefalse
-
-