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 java.lang.String |
ALIGN
The name of the "align" attribute.
|
static java.lang.String |
ALPHA
The name of the "alpha" attribute.
|
static java.lang.String |
DRAW_DOUBLE
The name of the "draw_double" attribute.
|
static java.lang.String |
DRAW_DOUBLE_ALWAYS
The name of the "draw_double_always" attribute.
|
static java.lang.String |
GLOW_RADIUS
The name of the "glow_radius" attribute.
|
static java.lang.String |
LAYER
The name of the "layer" attribute.
|
static int |
MAX_SUB_LAYERS |
static java.lang.String |
ROTATE
The name of the "rotate" attribute.
|
static java.lang.String |
SUB_LAYER
The name of the "sub_layer" attribute.
|
static java.lang.String |
SYS_OBJECT
The name of the "sys_object" attribute.
|
static java.lang.String |
Z
The name of the "z" attribute.
|
static java.lang.String |
ZOOM
The name of the "zoom" attribute.
|
EDITOR_FOLDER_INTERN
ANIM_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,
FaceObjectProviders faceObjectProviders,
AnimationObjects animationObjects)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
G |
clone() |
void |
facesReloaded()
Will be called whenever the archetype faces have been reloaded.
|
javax.swing.Icon |
getDoubleImage()
Returns a double variant of the face for this GameObject.
|
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.
|
javax.swing.Icon |
getTransparentDoubleImage()
Returns a transparent variant of the face for this GameObject.
|
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(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, getNext, getPrev, getTopContainer, hasUndefinedArchetype, insertAfter, insertBefore, isBottom, isInContainer, isTop, markModified, moveBottom, moveDown, moveTop, moveUp, newInstance, notifyBeginChange, notifyEndChange, notifyTransientChange, remove, setArchetype, setContainer, visit
addMsgTextLine, 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, transientGameObjectChange, updateArchetype
addFirst, addLast, getFirst, getLast, getNext, getPrev, hasSameContents, insertAfter, insertBefore, isBottom, isEmpty, isTop, iterator, moveBottom, moveDown, moveTop, moveUp, recursive, remove, removeAll, replace, reverse, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFirst, addLast, applyMassChange, getFirst, getLast, getLightRadius, isEmpty, isScripted, iterator, propagateElevation, recursive, removeAll, reverse, updateTileStretch
addMsgTextLine, 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, toString
getAttributeDouble, getAttributeInt, getAttributeLong, getAttributeString, hasAttribute, removeAttribute, setAttributeInt
public static final int MAX_SUB_LAYERS
@NotNull public static final java.lang.String Z
@NotNull public static final java.lang.String LAYER
@NotNull public static final java.lang.String SUB_LAYER
@NotNull public static final java.lang.String SYS_OBJECT
@NotNull public static final java.lang.String DRAW_DOUBLE_ALWAYS
@NotNull public static final java.lang.String DRAW_DOUBLE
@NotNull public static final java.lang.String ALIGN
@NotNull public static final java.lang.String ZOOM
@NotNull public static final java.lang.String ALPHA
@NotNull public static final java.lang.String ROTATE
@NotNull public static final java.lang.String GLOW_RADIUS
protected DefaultIsoGameObject(@NotNull R archetype, @NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects)
archetype
- the base archetypefaceObjectProviders
- the face object providers for looking up
facesanimationObjects
- the animation objects for looking up animationspublic boolean usesDirection()
public void setObjectFace()
setObjectFace
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 javax.swing.Icon getTransparentImage()
@NotNull public javax.swing.Icon getDoubleImage()
@NotNull public 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 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()
clone
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 BaseObject<?,?,?,?> gameObject)
isEqual
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()
facesReloaded
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>>