 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.map.renderer;
22 import java.awt.Graphics2D;
23 import javax.swing.ImageIcon;
31 import org.jetbrains.annotations.NotNull;
85 protected void paint(@NotNull
final Graphics2D graphics2D,
final int xStart,
final int yStart, @NotNull
final G gameObject) {
95 if (tmpNode !=
null && tmpNode.getArchetype().isLowestPart() || head.
getArchetype().isLowestPart()) {
96 icon.paintIcon(
this, graphics2D, x, y);
100 icon.paintIcon(
this, graphics2D, x, y);
105 icon.paintIcon(
this, graphics2D, xStart - xOffset, yStart - yOffset);
112 paint(graphics2D, xStart, yStart, mob);
Abstract base class for ISO MapRenderers.
A MapModel reflects the data of a map.
final MapModel< G, A, R > mapModel
The MapModel to render.
int getXOffset(final int shapeID, final int positionID)
Calculate the x-offset from the leftmost pixel of the big face image and the default x-position (The ...
boolean isMulti()
Returns whether this Archetype is a multi-part object.
Base package of all Gridarta classes.
Provides information about isometric map squares.
void paint(@NotNull final Graphics2D graphics2D, final int xStart, final int yStart, @NotNull final G gameObject)
static final long serialVersionUID
The serial version UID.
int getYOffset(final int shapeID, final int positionID)
Calculate the y-offset from the topmost pixel of the big face image and the default y-position (The d...
Reflects a game object (object on a map).
int getXLen()
Returns the horizontal size of a square.
G getFirst()
Return the first GameObject contained in this container.
R getArchetype()
Returns the Archetype this GameObject is based on.
final MultiPositionData multiPositionData
The MultiPositionData to query for multi-part objects.
GameObjects are the objects based on Archetypes found on maps.
ImageIcon getNormalImage()
Returns the normal face for this GameObject.
Interface for MapArchObjects.
SimpleIsoMapRenderer(final int spawnPointTypeNo, @NotNull final MapModel< G, A, R > mapModel, @NotNull final MultiPositionData multiPositionData, @NotNull final IsoMapSquareInfo isoMapSquareInfo, @NotNull final ImageIcon unknownSquareIcon)
Creates a new instance.
T getHead()
Return the head part of a multi-part object.
int getYLen()
Returns the vertical size of a square.
String getFaceObjName()
Returns the face name, can be from animation or face.
Renders maps without MapGrid or validation errors.
The MultiPositionData class stores an array of numbers which is required in order to calculate displa...
int getTypeNo()
Returns the type number of this Archetype.
final int spawnPointTypeNo
The game object type number of spawn points.
int getMultiRefCount()
Returns the number of parts for multi-part heads.
final IsoMapSquareInfo isoMapSquareInfo
The IsoMapSquareInfo to use.
final ImageIcon unknownSquareIcon
The icon for unknown squares.
G getContainerGameObject()
Returns the environment game object if this game object is in the inventory or.