public abstract class DefaultIsoGameObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractGameObject<G,A,R>
GameObject implementing classes.| Modifier and Type | Field and Description |
|---|---|
static @NotNull java.lang.String |
ALIGN
The name of the "align" attribute.
|
static @NotNull java.lang.String |
ALPHA
The name of the "alpha" attribute.
|
protected static @NotNull java.lang.String |
DRAW_DOUBLE
The name of the "draw_double" attribute.
|
protected static @NotNull java.lang.String |
DRAW_DOUBLE_ALWAYS
The name of the "draw_double_always" attribute.
|
protected static @NotNull java.lang.String |
GLOW_RADIUS
The name of the "glow_radius" attribute.
|
static @NotNull java.lang.String |
LAYER
The name of the "layer" attribute.
|
static int |
MAX_SUB_LAYERS |
static @NotNull java.lang.String |
ROTATE
The name of the "rotate" attribute.
|
static @NotNull java.lang.String |
SUB_LAYER
The name of the "sub_layer" attribute.
|
static @NotNull java.lang.String |
SYS_OBJECT
The name of the "sys_object" attribute.
|
static @NotNull java.lang.String |
Z
The name of the "z" attribute.
|
static @NotNull java.lang.String |
ZOOM
The name of the "zoom" attribute.
|
EDITOR_FOLDER_INTERNANIM_SPEED, ANIMATION, BLOCKSVIEW, DIRECTION, EDIT_TYPE_NONE, FACE, HP, IS_ANIMATED, IS_TURNABLE, LAST_HEAL, LEVEL, NAME, NO_PASS, NO_PICK, SLAYING, SP, TITLE, TYPE| Modifier | Constructor and Description |
|---|---|
protected |
DefaultIsoGameObject(R archetype,
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
G |
clone()
Creates a clone of this base object.
|
void |
facesReloaded()
Will be called whenever the archetype faces have been reloaded.
|
@NotNull javax.swing.Icon |
getDoubleImage()
Returns a double variant of the face for this GameObject.
|
@NotNull javax.swing.Icon |
getStretchedImage(long stretchFactor)
Returns a stretched variant of the face for this floor-type GameObject.
|
long |
getStretchFactor()
Acquire stretch factor of the object.
|
@NotNull javax.swing.Icon |
getTransparentDoubleImage()
Returns a transparent variant of the face for this GameObject.
|
@NotNull javax.swing.Icon |
getTransparentImage()
Returns a transparent variant of the face for this GameObject.
|
int |
getYOffset()
Acquire Y offset of the object for rendering purposes.
|
abstract boolean |
isDrawDouble(boolean drawDoubleFaces)
Returns whether to draw this game object with double height.
|
boolean |
isEqual(@NotNull BaseObject<?,?,?,?> gameObject)
Compares this object to another game object.
|
abstract boolean |
isStretched(boolean tileStretching)
Returns whether to draw this game object with stretching transformation.
|
void |
refreshStretchFactor()
Invalidates stretch factor value calculated by
getStretchFactor() and clears the stored stretched face. |
void |
setObjectFace()
We set here the real face of the objects, depending on the set face and
the set animation.
|
boolean |
usesDirection()
Return whether this base object uses the "direction" attribute.
|
asGameObject, getArchetype, getAttributeString, getContainer, getContainerGameObject, getEffectiveFaceName, getMapSquare, getMapSquareOptional, getNext, getPrev, getTopContainer, hasUndefinedArchetype, insertAfter, insertBefore, isBottom, isInContainer, isTop, markModified, moveBottom, moveDown, moveTop, moveUp, newInstance, notifyBeginChange, notifyEndChange, notifyTransientChange, remove, setArchetype, setContainer, visitaddMsgTextLine, addObjectText, addTailPart, beginGameObjectChange, countInvObjects, endGameObjectChange, getAnimName, getAttributeDouble, getAttributeDouble, getAttributeInt, getAttributeInt, getAttributeKeys, getAttributeLong, getAttributeLong, getAttributeString, getAttributeValue, getBestName, getDirection, getEditType, getFaceName, getFaceObjName, getFaceObjSource, getHead, getLoreText, getMapLocation, getMapX, getMapY, getMaxX, getMaxY, getMinX, getMinY, getMsgText, getMulti, getMultiNext, getMultiRefCount, getNormalImage, getObjectText, getObjName, getSizeX, getSizeY, getThis, getTypeNo, hasAttribute, hasAttribute, isDefaultGameObject, isHead, isMulti, isTail, removeAttribute, removeTailParts, setAttributeInt, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectText, setThisContainer, toString, updateArchetypeaddFirst, addLast, getFirst, getLast, getNext, getPrev, hasSameContents, insertAfter, insertBefore, isBottom, isEmpty, isTop, iterator, moveBottom, moveDown, moveTop, moveUp, recursive, remove, removeAll, replace, reverse, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddFirst, addLast, applyMassChange, getFirst, getLast, getLightRadius, isEmpty, isScripted, iterator, propagateElevation, recursive, removeAll, reverse, updateTileStretchaddMsgTextLine, addObjectText, addTailPart, countInvObjects, getAnimName, getAttributeDouble, getAttributeInt, getAttributeLong, getBestName, getDirection, getEditType, getFaceName, getFaceObjName, getFaceObjSource, getHead, getLoreText, getMapLocation, getMapX, getMapY, getMaxX, getMaxY, getMinX, getMinY, getMsgText, getMultiNext, getMultiRefCount, getNormalImage, getObjectText, getObjName, getSizeX, getSizeY, getTypeNo, hasAttribute, isDefaultGameObject, isHead, isMulti, isTail, removeTailParts, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectText, toStringgetAttributeDouble, getAttributeInt, getAttributeLong, getAttributeString, hasAttribute, removeAttribute, setAttributeIntpublic static final int MAX_SUB_LAYERS
@NotNull public static final @NotNull java.lang.String Z
@NotNull public static final @NotNull java.lang.String LAYER
@NotNull public static final @NotNull java.lang.String SUB_LAYER
@NotNull public static final @NotNull java.lang.String SYS_OBJECT
@NotNull protected static final @NotNull java.lang.String DRAW_DOUBLE_ALWAYS
@NotNull protected static final @NotNull java.lang.String DRAW_DOUBLE
@NotNull public static final @NotNull java.lang.String ALIGN
@NotNull public static final @NotNull java.lang.String ZOOM
@NotNull public static final @NotNull java.lang.String ALPHA
@NotNull public static final @NotNull java.lang.String ROTATE
@NotNull protected static final @NotNull java.lang.String GLOW_RADIUS
protected DefaultIsoGameObject(@NotNull
R archetype,
@NotNull
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull
@NotNull AnimationObjects animationObjects)
archetype - the base archetypefaceObjectProviders - the face object providers for looking up
facesanimationObjects - the animation objects for looking up animationspublic boolean usesDirection()
BaseObjectpublic void setObjectFace()
BaseObjectsetObjectFace in interface BaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>setObjectFace in class AbstractBaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>@NotNull public @NotNull javax.swing.Icon getTransparentImage()
@NotNull public @NotNull javax.swing.Icon getDoubleImage()
@NotNull public @NotNull javax.swing.Icon getTransparentDoubleImage()
public final int getYOffset()
public final void refreshStretchFactor()
getStretchFactor() and clears the stored stretched face.public final long getStretchFactor()
refreshStretchFactor()@NotNull public @NotNull javax.swing.Icon getStretchedImage(long stretchFactor)
public abstract boolean isDrawDouble(boolean drawDoubleFaces)
drawDoubleFaces - whether the "draw double faces" map view setting
is enabledpublic abstract boolean isStretched(boolean tileStretching)
tileStretching - whether the "tile-stretching" map view setting is
enabled@NotNull public G clone()
BaseObjectclone in interface BaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>clone in class AbstractGameObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>public boolean isEqual(@NotNull
@NotNull BaseObject<?,?,?,?> gameObject)
BaseObjectisEqual in interface BaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>isEqual in class AbstractBaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>gameObject - the other game objecttrue if this object equals the other objectpublic void facesReloaded()
BaseObjectfacesReloaded in interface BaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>facesReloaded in class AbstractBaseObject<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,G extends GameObject<G,A,R>>