public class GameObject extends AbstractGameObject<GameObject,MapArchObject,Archetype>
GameObjectContainer
for
issues about thisModifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEVATION
The name of the "elevation" attribute.
|
static java.lang.String |
INVISIBLE
The name of the "invisible" attribute.
|
static java.lang.String |
SMOOTHLEVEL
The name of the "smoothlevel" 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
Constructor and Description |
---|
GameObject(Archetype archetype,
FaceObjectProviders faceObjectProviders,
AnimationObjects animationObjects)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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 |
isDefaultGameObject()
Returns whether this game object is unmodified from its underlying
archetype.
|
boolean |
isEqual(BaseObject<?,?,?,?> gameObject)
Compares this object to another game object.
|
boolean |
isScripted()
Returns whether this GameObject has one or more scripted events defined.
|
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.
|
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, facesReloaded, 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, isHead, isMulti, isTail, removeAttribute, removeTailParts, setAttributeInt, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectFace, 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, getFirst, getLast, isEmpty, iterator, recursive, removeAll, reverse
addMsgTextLine, addObjectText, addTailPart, countInvObjects, facesReloaded, 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, isHead, isMulti, isTail, removeTailParts, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectFace, setObjectText, toString
getAttributeDouble, getAttributeInt, getAttributeLong, getAttributeString, hasAttribute, removeAttribute, setAttributeInt
@NotNull public static final java.lang.String ELEVATION
@NotNull public static final java.lang.String INVISIBLE
@NotNull public static final java.lang.String SMOOTHLEVEL
public GameObject(@NotNull Archetype 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 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 usesDirection()
@NotNull public GameObject clone()
clone
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
clone
in class AbstractGameObject<GameObject,MapArchObject,Archetype>
public boolean isScripted()
true
if this GameObject has one or more scripted events,
otherwise false
public boolean isDefaultGameObject()
isDefaultGameObject
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
isDefaultGameObject
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
public boolean isEqual(@NotNull BaseObject<?,?,?,?> gameObject)
isEqual
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
isEqual
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
gameObject
- the other game objecttrue
if this object equals the other object@NotNull protected GameObject getThis()
this
as its real type.getThis
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
this
public int getLightRadius()
0
if this object does not
emit light