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(@NotNull Archetype archetype,
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects,
@NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addFirst(@NotNull GameObject gameObject)
Adds the given game object at the end of this container.
|
void |
addLast(@NotNull GameObject gameObject)
Adds the given game object at the end of this container.
|
void |
applyMassChange(@NotNull java.lang.Integer[] layers,
@NotNull java.lang.Integer[] subLayers,
@NotNull java.lang.String changes)
Applies mass changes to the specified object if all the match conditions
are met.
|
@NotNull GameObject |
clone()
Creates a clone of this base object.
|
int |
getLightRadius()
Returns the effective light radius of this game object.
|
protected @NotNull 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(@NotNull BaseObject<?,?,?,?> gameObject)
If there is elevation data in the other game object, move it to here.
|
void |
updateTileStretch(int heightValue,
boolean isAbsolute,
@NotNull 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, getMapSquareOptional, 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, 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 @NotNull Archetype archetype, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @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 @NotNull GameObject gameObject)
GameObjectContainer
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 @NotNull GameObject gameObject)
GameObjectContainer
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 @NotNull BaseObject<?,?,?,?> gameObject)
GameObject
gameObject
- the other game objectpublic void updateTileStretch(int heightValue, boolean isAbsolute, @NotNull @NotNull java.lang.Integer[] subLayers)
GameObject
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 @NotNull java.lang.Integer[] layers, @NotNull @NotNull java.lang.Integer[] subLayers, @NotNull @NotNull java.lang.String changes)
GameObject
layers
- layers to match, can be emptysubLayers
- sub-layers to match, can be emptychanges
- changes to applypublic boolean isDrawDouble(boolean drawDoubleFaces)
DefaultIsoGameObject
isDrawDouble
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
drawDoubleFaces
- whether the "draw double faces" map view setting
is enabledpublic boolean isStretched(boolean tileStretching)
DefaultIsoGameObject
isStretched
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
tileStretching
- whether the "tile-stretching" map view setting is
enabled@NotNull public @NotNull GameObject clone()
BaseObject
clone
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
clone
in class DefaultIsoGameObject<GameObject,MapArchObject,Archetype>
@NotNull protected @NotNull GameObject getThis()
AbstractBaseObject
this
as its real type.getThis
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
this
public boolean isScripted()
GameObject
true
if this GameObject has one or more scripted events,
otherwise false
public int getLightRadius()
GameObject
0
if this object does not
emit light