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(@NotNull 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(@NotNull MapModel<G,A,R> mapModel,
@Nullable java.awt.Point point)
Returns an exit game object on a given map square.
|
@Nullable GameObject<G,A,R> |
getValidExit(G exit)
Returns whether the given game object is an exit game object having exit
information.
|
G |
getValidExit(@NotNull MapModel<G,A,R> mapModel,
@NotNull java.awt.Point point)
Returns an exit game object on a given map square having exit
information.
|
boolean |
isMatching(@NotNull GameObject<?,?,?> gameObject)
Matches a
GameObject . |
public ExitMatcher(@NotNull @NotNull GameObjectMatcher exitMatcher)
exitMatcher
- the matcher for selecting exit objects@Nullable public G getValidExit(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull java.awt.Point point)
mapModel
- the map model to checkpoint
- the map square to check@Nullable public @Nullable GameObject<G,A,R> getValidExit(@Nullable G exit)
exit
- the game object to checknull
@Nullable public G getExit(@NotNull @NotNull MapModel<G,A,R> mapModel, @Nullable @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 @NotNull GameObject<?,?,?> gameObject)
GameObjectMatcher
GameObject
.isMatching
in interface GameObjectMatcher
gameObject
- the GameObject
to matchtrue
if this matcher matches the given game object,
otherwise false