public class GameObject extends AbstractGameObject<GameObject,MapArchObject,Archetype>
GameObjectContainer
for
issues about thisModifier and Type | Field and Description |
---|---|
static @NotNull java.lang.String |
ELEVATION
The name of the "elevation" attribute.
|
static @NotNull java.lang.String |
INVISIBLE
The name of the "invisible" attribute.
|
static @NotNull 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(@NotNull Archetype archetype,
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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 |
isDefaultGameObject()
Returns whether this game object is unmodified from its underlying
archetype.
|
boolean |
isEqual(@NotNull BaseObject<?,?,?,?> gameObject)
Compares this object to another game object.
|
boolean |
isScripted()
Returns whether this GameObject has one or more scripted events defined.
|
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.
|
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, 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, 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 @NotNull java.lang.String ELEVATION
@NotNull public static final @NotNull java.lang.String INVISIBLE
@NotNull public static final @NotNull java.lang.String SMOOTHLEVEL
public GameObject(@NotNull @NotNull Archetype 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 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 usesDirection()
BaseObject
@NotNull public @NotNull GameObject clone()
BaseObject
clone
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
clone
in class AbstractGameObject<GameObject,MapArchObject,Archetype>
public boolean isScripted()
GameObject
true
if this GameObject has one or more scripted events,
otherwise false
public boolean isDefaultGameObject()
BaseObject
isDefaultGameObject
in interface BaseObject<GameObject,MapArchObject,Archetype,GameObject>
isDefaultGameObject
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
public boolean isEqual(@NotNull @NotNull BaseObject<?,?,?,?> gameObject)
BaseObject
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 @NotNull GameObject getThis()
AbstractBaseObject
this
as its real type.getThis
in class AbstractBaseObject<GameObject,MapArchObject,Archetype,GameObject>
this
public int getLightRadius()
GameObject
0
if this object does not
emit light