 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.mapmodel;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
93 mapSquare.addFirst(gameObject);
97 mapSquare.addLast(gameObject);
115 private <G extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>>
void replaceFloor(@NotNull
final G gameObject, @NotNull
final MapSquare<G, A, R> mapSquare, @Nullable
final G lastFloor) {
117 if (lastFloor !=
null && !lastFloor.isMulti()) {
118 mapSquare.replace(lastFloor, gameObject);
125 if (lastBelowFloor !=
null) {
126 mapSquare.insertAfter(lastBelowFloor, gameObject);
132 mapSquare.addFirst(gameObject);
145 private static <G extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>>
boolean replaceWall(@NotNull
final G gameObject, @NotNull
final GameObjectContainer<G, A, R> mapSquare, @Nullable
final G lastWall) {
146 if (lastWall !=
null && !lastWall.isMulti()) {
147 mapSquare.replace(lastWall, gameObject);
164 private static <G extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>>
void insertNonSystemObject(@NotNull
final G gameObject, @NotNull
final GameObjectContainer<G, A, R> mapSquare, @Nullable
final G firstSystemObject) {
165 mapSquare.insertAfter(firstSystemObject, gameObject);
Base package of all Gridarta classes.
private< G extends GameObject< G, A, R >, A extends MapArchObject< A >, R extends Archetype< G, A, R > > void replaceFloor(@NotNull final G gameObject, @NotNull final MapSquare< G, A, R > mapSquare, @Nullable final G lastFloor)
Replace a floor game object.
static final long serialVersionUID
The serial version UID.
public< G extends GameObject< G, A, R >, A extends MapArchObject< A >, R extends Archetype< G, A, R > > void insert(@NotNull final G gameObject, @NotNull final MapSquare< G, A, R > mapSquare)
Interface for classes that match GameObjects.
Reflects a game object (object on a map).
boolean isMatching(@NotNull GameObject<?, ?, ?> gameObject)
Matches a GameObject.
GameObjects are the objects based on Archetypes found on maps.
Classes related to matching {GameObjects}, so called { net.sf.gridarta.model.match....
final GameObjectMatcher floorGameObjectMatcher
A GameObjectMatcher matching floor game objects.
Interface for MapArchObjects.
Automatically guess the insertion position.
AutoInsertionMode(@Nullable final GameObjectMatcher floorGameObjectMatcher, @Nullable final GameObjectMatcher wallGameObjectMatcher, @Nullable final GameObjectMatcher belowFloorGameObjectMatcher, @Nullable final GameObjectMatcher systemObjectGameObjectMatcher)
Initializes the class.
final GameObjectMatcher systemObjectGameObjectMatcher
A GameObjectMatcher matching system objects that should stay on top.
static< G extends GameObject< G, A, R > A extends R extends Archetype< G, A, R > boolean replaceWall(@NotNull final G gameObject, @NotNull final GameObjectContainer< G, A, R > mapSquare, @Nullable final G lastWall)
static< G extends GameObject< G, A, R > A extends R extends Archetype< G, A, R > void insertNonSystemObject(@NotNull final G gameObject, @NotNull final GameObjectContainer< G, A, R > mapSquare, @Nullable final G firstSystemObject)
final GameObjectMatcher belowFloorGameObjectMatcher
A GameObjectMatcher matching monster game objects.
Base class for classes that contain GameObjects as children in the sense of containment.
final GameObjectMatcher wallGameObjectMatcher
A GameObjectMatcher matching wall game objects.