Gridarta Editor
net.sf.gridarta.model.mapmodel.AutoInsertionMode Class Reference

Automatically guess the insertion position. More...

+ Inheritance diagram for net.sf.gridarta.model.mapmodel.AutoInsertionMode:
+ Collaboration diagram for net.sf.gridarta.model.mapmodel.AutoInsertionMode:

Public Member Functions

 AutoInsertionMode (@Nullable final GameObjectMatcher floorGameObjectMatcher, @Nullable final GameObjectMatcher wallGameObjectMatcher, @Nullable final GameObjectMatcher belowFloorGameObjectMatcher, @Nullable final GameObjectMatcher systemObjectGameObjectMatcher)
 Initializes the class. More...
 
String toString ()
 

Package Functions

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)
 
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. More...
 

Static Package Functions

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)
 
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)
 

Private Attributes

final GameObjectMatcher belowFloorGameObjectMatcher
 A GameObjectMatcher matching monster game objects. More...
 
final GameObjectMatcher floorGameObjectMatcher
 A GameObjectMatcher matching floor game objects. More...
 
final GameObjectMatcher systemObjectGameObjectMatcher
 A GameObjectMatcher matching system objects that should stay on top. More...
 
final GameObjectMatcher wallGameObjectMatcher
 A GameObjectMatcher matching wall game objects. More...
 

Static Private Attributes

static< G extends GameObject< G, A, R > A extends MapArchObject< A >
 
static final long serialVersionUID = 1L
 The serial version UID. More...
 

Additional Inherited Members

- Public Attributes inherited from net.sf.gridarta.model.mapmodel.InsertionMode
< G extends GameObject< G, A, R > A extends MapArchObject< A >
 

Detailed Description

Automatically guess the insertion position.

May replace rather than insert the object.

Author
Andreas Kirschbaum

Definition at line 35 of file AutoInsertionMode.java.

Constructor & Destructor Documentation

◆ AutoInsertionMode()

net.sf.gridarta.model.mapmodel.AutoInsertionMode.AutoInsertionMode ( @Nullable final GameObjectMatcher  floorGameObjectMatcher,
@Nullable final GameObjectMatcher  wallGameObjectMatcher,
@Nullable final GameObjectMatcher  belowFloorGameObjectMatcher,
@Nullable final GameObjectMatcher  systemObjectGameObjectMatcher 
)

Initializes the class.

Parameters
floorGameObjectMatcherthe floor matcher to use
wallGameObjectMatcherthe wall matcher to use
belowFloorGameObjectMatcherthe game object to insert below the floor
systemObjectGameObjectMatchermatches system objects that should stay on top

Definition at line 80 of file AutoInsertionMode.java.

References net.sf.gridarta.model.mapmodel.AutoInsertionMode.belowFloorGameObjectMatcher, net.sf.gridarta.model.mapmodel.AutoInsertionMode.floorGameObjectMatcher, net.sf.gridarta.model.mapmodel.AutoInsertionMode.systemObjectGameObjectMatcher, and net.sf.gridarta.model.mapmodel.AutoInsertionMode.wallGameObjectMatcher.

Member Function Documentation

◆ insert()

◆ insertNonSystemObject()

static <G extends GameObject<G, A, R> A extends R extends Archetype<G, A, R> void net.sf.gridarta.model.mapmodel.AutoInsertionMode.insertNonSystemObject ( @NotNull final G  gameObject,
@NotNull final GameObjectContainer< G, A, R >  mapSquare,
@Nullable final G  firstSystemObject 
)
staticpackage

Definition at line 164 of file AutoInsertionMode.java.

Referenced by net.sf.gridarta.model.mapmodel.AutoInsertionMode.insert().

+ Here is the caller graph for this function:

◆ replaceFloor()

private<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R> > void net.sf.gridarta.model.mapmodel.AutoInsertionMode.replaceFloor ( @NotNull final G  gameObject,
@NotNull final MapSquare< G, A, R >  mapSquare,
@Nullable final G  lastFloor 
)
package

Replace a floor game object.

Parameters
gameObjectthe game object to insert with
mapSquarethe map square to modify
lastFloorthe last floor game object within
mapSquare
<G>the game object type of the object
<A>the map arch object type of the object
<R>the archetype type of the object

Definition at line 115 of file AutoInsertionMode.java.

References net.sf.gridarta.model.mapmodel.AutoInsertionMode.belowFloorGameObjectMatcher.

Referenced by net.sf.gridarta.model.mapmodel.AutoInsertionMode.insert().

+ Here is the caller graph for this function:

◆ replaceWall()

static <G extends GameObject<G, A, R> A extends R extends Archetype<G, A, R> boolean net.sf.gridarta.model.mapmodel.AutoInsertionMode.replaceWall ( @NotNull final G  gameObject,
@NotNull final GameObjectContainer< G, A, R >  mapSquare,
@Nullable final G  lastWall 
)
staticpackage

Definition at line 145 of file AutoInsertionMode.java.

Referenced by net.sf.gridarta.model.mapmodel.AutoInsertionMode.insert().

+ Here is the caller graph for this function:

◆ toString()

String net.sf.gridarta.model.mapmodel.AutoInsertionMode.toString ( )

Definition at line 102 of file AutoInsertionMode.java.

Member Data Documentation

◆ belowFloorGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionMode.belowFloorGameObjectMatcher
private

◆ floorGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionMode.floorGameObjectMatcher
private

◆ MapArchObject< A >

<G extends GameObject<G, A, R> A extends net.sf.gridarta.model.mapmodel.AutoInsertionMode.MapArchObject< A >
staticprivate

Definition at line 145 of file AutoInsertionMode.java.

◆ serialVersionUID

final long net.sf.gridarta.model.mapmodel.AutoInsertionMode.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 40 of file AutoInsertionMode.java.

◆ systemObjectGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionMode.systemObjectGameObjectMatcher
private

A GameObjectMatcher matching system objects that should stay on top.

@serial

Definition at line 69 of file AutoInsertionMode.java.

Referenced by net.sf.gridarta.model.mapmodel.AutoInsertionMode.AutoInsertionMode(), and net.sf.gridarta.model.mapmodel.AutoInsertionMode.insert().

◆ wallGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionMode.wallGameObjectMatcher
private

The documentation for this class was generated from the following file: