public class GameObject extends DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
GameObjectContainer
for
issues about thisALIGN, ALPHA, DRAW_DOUBLE, DRAW_DOUBLE_ALWAYS, GLOW_RADIUS, LAYER, MAX_SUB_LAYERS, ROTATE, SUB_LAYER, SYS_OBJECT, Z, ZOOM
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
Constructor and Description |
---|
GameObject(Archetype archetype,
FaceObjectProviders faceObjectProviders,
AnimationObjects animationObjects,
ArchetypeTypeSet archetypeTypeSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addFirst(GameObject gameObject)
Add the given GameObject at the end of this Container.
|
void |
addLast(GameObject gameObject)
Add the given GameObject at the end of this Container.
|
void |
applyMassChange(java.lang.Integer[] layers,
java.lang.Integer[] subLayers,
java.lang.String changes)
Applies mass changes to the specified object if all the match conditions
are met.
|
GameObject |
clone() |
int |
getLightRadius()
Returns the effective light radius of this game object.
|
protected GameObject |
getThis()
Returns
this as its real type. |
boolean |
isDrawDouble(boolean drawDoubleFaces)
Returns whether to draw this game object with double height.
|
boolean |
isScripted()
Returns whether this GameObject has one or more scripted events defined.
|
boolean |
isStretched(boolean tileStretching)
Returns whether to draw this game object with stretching transformation.
|
void |
propagateElevation(BaseObject<?,?,?,?> gameObject)
If there is elevation data in the other game object, move it to here.
|
void |
updateTileStretch(int heightValue,
boolean isAbsolute,
java.lang.Integer[] subLayers)
Updates the tile stretching value of the selected object.
|
facesReloaded, getDoubleImage, getStretchedImage, getStretchFactor, getTransparentDoubleImage, getTransparentImage, getYOffset, isEqual, refreshStretchFactor, setObjectFace, usesDirection
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, getTypeNo, hasAttribute, hasAttribute, isDefaultGameObject, isHead, isMulti, isTail, removeAttribute, removeTailParts, setAttributeInt, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectText, setThisContainer, toString, transientGameObjectChange, updateArchetype
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
getFirst, getLast, isEmpty, iterator, recursive, removeAll, reverse
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 GameObject(@NotNull Archetype archetype, @NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects, @NotNull ArchetypeTypeSet archetypeTypeSet)
archetype
- the base archetypefaceObjectProviders
- the face object providers for looking up
facesanimationObjects
- the animation objects for looking up animationsarchetypeTypeSet
- the archetype type set for looking up archetype
typespublic void addLast(@NotNull GameObject gameObject)
addLast
in interface GameObject<GameObject,MapArchObject,Archetype>
addLast
in class GameObjectContainer<GameObject,MapArchObject,Archetype>
gameObject
- the free yet unlinked GameObject
to be placed
in the inventorypublic void addFirst(@NotNull GameObject gameObject)
addFirst
in interface GameObject<GameObject,MapArchObject,Archetype>
addFirst
in class GameObjectContainer<GameObject,MapArchObject,Archetype>
gameObject
- the free yet unlinked GameObject
to be placed
in the inventorypublic void propagateElevation(@NotNull BaseObject<?,?,?,?> gameObject)
gameObject
- the other game objectpublic void updateTileStretch(int heightValue, boolean isAbsolute, @Nullable java.lang.Integer[] subLayers)
heightValue
- height valueisAbsolute
- whether the height change value is absolute or
relativesubLayers
- sub-layers to affect or null
to affect all
layerspublic void applyMassChange(@NotNull java.lang.Integer[] layers, @NotNull java.lang.Integer[] subLayers, @NotNull java.lang.String changes)
layers
- layers to match, can be emptysubLayers
- sub-layers to match, can be emptychanges
- changes to applypublic boolean isDrawDouble(boolean drawDoubleFaces)
isDrawDouble
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
drawDoubleFaces
- whether the "draw double faces" map view setting
is enabledpublic boolean isStretched(boolean tileStretching)
isStretched
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
tileStretching
- whether the "tile-stretching" map view setting is
enabled@NotNull public GameObject clone()
clone
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
clone
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
@NotNull protected GameObject getThis()
this
as its real type.getThis
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
this
public boolean isScripted()
true
if this GameObject has one or more scripted events,
otherwise false
public int getLightRadius()
0
if this object does not
emit light