public class ExitMatcher<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements GameObjectMatcher
Constructor and Description |
---|
ExitMatcher(GameObjectMatcher exitMatcher)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
G |
getExit(G exit)
Returns whether the given game object is an exit game object.
|
G |
getExit(MapModel<G,A,R> mapModel,
java.awt.Point point)
Returns an exit game object on a given map square.
|
GameObject<G,A,R> |
getValidExit(G exit)
Returns whether the given game object is an exit game object having exit
information.
|
G |
getValidExit(MapModel<G,A,R> mapModel,
java.awt.Point point)
Returns an exit game object on a given map square having exit
information.
|
boolean |
isMatching(GameObject<?,?,?> gameObject)
Matches an
GameObject . |
public ExitMatcher(@NotNull GameObjectMatcher exitMatcher)
exitMatcher
- the matcher for selecting exit objects@Nullable public G getValidExit(@NotNull MapModel<G,A,R> mapModel, @NotNull java.awt.Point point)
mapModel
- the map model to checkpoint
- the map square to check@Nullable public GameObject<G,A,R> getValidExit(@Nullable G exit)
exit
- the game object to checknull
@Nullable public G getExit(@NotNull MapModel<G,A,R> mapModel, @Nullable java.awt.Point point)
mapModel
- the map model to checkpoint
- the map square to checknull
if none was
found@Nullable public G getExit(@Nullable G exit)
exit
- the game object to checknull
public boolean isMatching(@NotNull GameObject<?,?,?> gameObject)
GameObject
.isMatching
in interface GameObjectMatcher
gameObject
- the GameObject
to matchtrue
if this matcher matches the given game object,
otherwise false