Package zombie.iso
Class IsoObject
java.lang.Object
zombie.iso.IsoObject
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BSFurnace
,IsoBarbecue
,IsoBarricade
,IsoCompost
,IsoCrate
,IsoCurtain
,IsoDoor
,IsoFire
,IsoFireplace
,IsoGenerator
,IsoJukebox
,IsoLightSwitch
,IsoMovingObject
,IsoRaindrop
,IsoRainSplash
,IsoStove
,IsoThumpable
,IsoTrap
,IsoTree
,IsoWaveSignal
,IsoWindow
,IsoWoodenWall
,IsoWorldInventoryObject
public class IsoObject
extends java.lang.Object
implements java.io.Serializable
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IsoObject.VisionResult
-
Field Summary
Fields Modifier and Type Field Description float[]
alpha
static float
alphaStep
java.util.ArrayList
AttachedAnimSprite
java.util.ArrayList
AttachedAnimSpriteActual
static float
bmod
boolean
bNeverDoneAlpha
ItemContainer
container
short
Damage
IsoDirections
dir
BaseSoundEmitter
emitter
protected IsoObject
externalWaterSource
static float
gmod
boolean
highlighted
int
keyId
static IsoObject
lastRendered
static IsoObject
lastRenderedRendered
static int
MAX_WALL_SPLATS
java.lang.String
name
boolean
NoPicking
float
offsetX
float
offsetY
boolean
OutlineOnMouseover
IsoSprite
overlaySprite
ColorInfo
overlaySpriteColor
IsoObject
rerouteCollide
IsoObject
rerouteMask
static float
rmod
boolean
sheetRope
float
sheetRopeHealth
IsoSprite
sprite
java.lang.String
spriteName
IsoGridSquare
square
static ColorInfo
stCol
int
sx
int
sy
KahluaTable
table
float[]
targetAlpha
float
tintb
float
tintg
float
tintr
protected boolean
usesExternalWaterSource
java.util.ArrayList
wallBloodSplats
-
Constructor Summary
Constructors Constructor Description IsoObject()
IsoObject(IsoCell cell)
IsoObject(IsoCell cell, IsoGridSquare square, java.lang.String gid)
IsoObject(IsoCell cell, IsoGridSquare square, IsoSprite spr)
IsoObject(IsoGridSquare square, java.lang.String tile)
IsoObject(IsoGridSquare square, java.lang.String tile, boolean bShareTilesWithMap)
IsoObject(IsoGridSquare square, java.lang.String tile, java.lang.String name)
IsoObject(IsoGridSquare square, java.lang.String tile, java.lang.String name, boolean bShareTilesWithMap)
-
Method Summary
Modifier and Type Method Description void
addChild(IsoObject child)
void
addSecondaryContainer(ItemContainer container)
void
addToWorld()
void
AttachAnim(java.lang.String ObjectName, java.lang.String AnimName, int NumFrames, float frameIncrease, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias, ColorInfo TintMod)
void
AttachExistingAnim(IsoSprite spr, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias)
void
AttachExistingAnim(IsoSprite spr, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias, ColorInfo TintMod)
void
AttackObject(IsoGameCharacter owner)
void
checkHaveElectricity()
static byte[]
createChecksum(java.lang.String filename)
void
createContainersFromSpriteProperties()
void
debugPrintout()
void
DirtySlice()
static boolean
DoChecksumCheck()
static boolean
DoChecksumCheck(java.lang.String str, java.lang.String expected)
void
doFindExternalWaterSource()
void
DoSpecialTooltip(ObjectTooltip tooltipUI, IsoGridSquare square)
void
DoTooltip(ObjectTooltip tooltipUI)
static java.lang.Class
factoryClassFromFileInput(IsoCell cell, int classID)
static IsoObject
factoryFromFileInput(IsoCell cell, int classID)
static IsoObject
factoryFromFileInput(IsoCell cell, java.nio.ByteBuffer b)
protected IsoObject
FindExternalWaterSource(IsoGridSquare targetSq, boolean doAbove)
float
getAlpha()
float
getAlphaStep()
java.util.ArrayList
getAttachedAnimSprite()
IsoCell
getCell()
java.util.ArrayList
getChildSprites()
ItemContainer
getContainer()
ItemContainer
getContainerByEitherType(java.lang.String type1, java.lang.String type2)
ItemContainer
getContainerByIndex(int index)
ItemContainer
getContainerByType(java.lang.String type)
int
getContainerCount()
int
getContainerIndex(ItemContainer container)
ColorInfo
getCustomColor()
short
getDamage()
IsoDirections
getDir()
Vector2
getFacingPosition(Vector2 pos)
Vector2
getFacingPositionAlt(Vector2 pos)
ColorInfo
getHighlightColor()
boolean
getIsSurfaceNormalOffset()
ItemContainer
getItemContainer()
int
getKeyId()
static IsoObject
getLastRendered()
static IsoObject
getLastRenderedRendered()
float
getMaskClickedY(int x, int y, boolean flip)
static java.lang.String
getMD5Checksum(java.lang.String filename)
KahluaTable
getModData()
java.lang.String
getName()
static IsoObject
getNew()
int
getObjectIndex()
java.lang.String
getObjectName()
float
getOffsetX()
float
getOffsetY()
IsoSprite
getOverlaySprite()
ColorInfo
getOverlaySpriteColor()
PropertyContainer
getProperties()
float
getRenderYOffset()
IsoObject
getRerouteCollide()
IsoObject
getRerouteMask()
IsoObject
getRerouteMaskObject()
java.lang.String
getScriptName()
int
getSpecialObjectIndex()
IsoSprite
getSprite()
java.lang.String
getSpriteName()
IsoGridSquare
getSquare()
int
getStaticMovingObjectIndex()
float
getSurfaceNormalOffset()
float
getSurfaceOffset()
KahluaTable
getTable()
float
getTargetAlpha()
java.lang.String
getTextureName()
java.lang.String
getTile()
IsoObjectType
getType()
boolean
getUsesExternalWaterSource()
int
getWaterAmount()
int
getWorldObjectIndex()
float
getX()
float
getY()
float
getZ()
boolean
hasExternalWaterSource()
boolean
hasModData()
boolean
HasTooltip()
boolean
hasWater()
boolean
haveSpecialTooltip()
boolean
isBlink()
boolean
isCharacter()
boolean
isMaskClicked(int x, int y)
boolean
isMaskClicked(int x, int y, boolean flip)
boolean
isNoPicking()
boolean
isOutlineOnMouseover()
boolean
isTableSurface()
boolean
isTableTopObject()
boolean
isZombie()
void
load(java.nio.ByteBuffer input, int WorldVersion)
void
loadChange(java.lang.String change, java.nio.ByteBuffer bb)
void
loadFromRemoteBuffer(java.nio.ByteBuffer b)
void
loadFromRemoteBuffer(java.nio.ByteBuffer b, boolean addToObjects)
boolean
onMouseLeftClick(int x, int y)
void
onMouseRightClick(int lx, int ly)
void
onMouseRightReleased()
void
removeAllContainers()
void
RemoveAttachedAnim(int index)
void
RemoveAttachedAnims()
void
removeFromSquare()
void
removeFromWorld()
void
render(float x, float y, float z, ColorInfo col, boolean bDoAttached)
void
render(float x, float y, float z, ColorInfo col, boolean bDoAttached, boolean bWallLightingPass)
void
renderlast()
void
renderObjectPicker(float x, float y, float z, ColorInfo lightInfo)
InventoryItem
replaceItem(InventoryItem item)
void
reset()
void
reuseGridSquare()
void
save(java.nio.ByteBuffer output)
void
saveChange(java.lang.String change, KahluaTable tbl, java.nio.ByteBuffer bb)
void
sendObjectChange(java.lang.String change)
void
sendObjectChange(java.lang.String change, java.lang.Object[] args)
void
sendObjectChange(java.lang.String change, KahluaTable tbl)
boolean
Serialize()
void
setAlpha(float alpha)
void
setAlphaStep(float alphaStep)
void
setAttachedAnimSprite(java.util.ArrayList AttachedAnimSprite)
void
setBlink(boolean blink)
void
setChildSprites(java.util.ArrayList AttachedAnimSprite)
void
setContainer(ItemContainer container)
void
setCustomColor(float r, float g, float b, float a)
void
setCustomColor(ColorInfo col)
void
setDamage(short Damage)
static void
setDefaultCondition(int i)
void
setDir(int dir)
void
setDir(IsoDirections dir)
void
setHighlightColor(ColorInfo highlightColor)
void
setHighlighted(boolean highlight)
void
setKeyId(int keyId)
static void
setLastRendered(IsoObject aLastRendered)
static void
setLastRenderedRendered(IsoObject aLastRenderedRendered)
void
setName(java.lang.String name)
void
SetName(java.lang.String name)
void
setNoPicking(boolean NoPicking)
void
setOffsetX(float offsetX)
void
setOffsetY(float offsetY)
void
setOutlineOnMouseover(boolean OutlineOnMouseover)
void
setOverlaySprite(java.lang.String spriteName)
void
setOverlaySprite(java.lang.String spriteName, float r, float g, float b, float a)
boolean
setOverlaySprite(java.lang.String spriteName, float r, float g, float b, float a, boolean bTransmit)
void
setOverlaySpriteColor(float r, float g, float b, float a)
void
setRenderYOffset(float f)
void
setRerouteCollide(IsoObject rerouteCollide)
void
setRerouteMask(IsoObject rerouteMask)
void
setSpecialTooltip(boolean specialTooltip)
void
setSprite(java.lang.String name)
void
setSprite(IsoSprite sprite)
void
setSpriteFromName(java.lang.String name)
void
setSquare(IsoGridSquare square)
void
setTable(KahluaTable table)
void
setTargetAlpha(float targetAlpha)
void
setType(IsoObjectType type)
void
setUsesExternalWaterSource(boolean b)
void
setWaterAmount(int units)
void
syncIsoObject(boolean bRemote, byte val, UdpConnection source, java.nio.ByteBuffer bb)
void
syncIsoObjectSend(ByteBufferWriter bb)
boolean
TestCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
boolean
TestPathfindCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
IsoObject.VisionResult
TestVision(IsoGridSquare from, IsoGridSquare to)
void
transmitCompleteItemToClients()
void
transmitCompleteItemToServer()
void
transmitCustomColor()
void
transmitModData()
void
transmitUpdatedSpriteToClients()
void
transmitUpdatedSpriteToClients(UdpConnection connection)
void
transmitUpdatedSpriteToServer()
void
update()
void
useItemOn(InventoryItem item)
int
useWater(int amount)
void
writeToRemoteBuffer(ByteBufferWriter b)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
highlighted
public boolean highlighted -
keyId
public int keyId -
emitter
-
sheetRopeHealth
public float sheetRopeHealth -
sheetRope
public boolean sheetRope -
alpha
public float[] alpha -
alphaStep
public static float alphaStep -
bNeverDoneAlpha
public boolean bNeverDoneAlpha -
AttachedAnimSprite
public java.util.ArrayList AttachedAnimSprite -
AttachedAnimSpriteActual
public java.util.ArrayList AttachedAnimSpriteActual -
MAX_WALL_SPLATS
public static final int MAX_WALL_SPLATS- See Also:
- Constant Field Values
-
wallBloodSplats
public java.util.ArrayList wallBloodSplats -
container
-
dir
-
Damage
public short Damage -
NoPicking
public boolean NoPicking -
offsetX
public float offsetX -
offsetY
public float offsetY -
OutlineOnMouseover
public boolean OutlineOnMouseover -
rerouteMask
-
sprite
-
overlaySprite
-
overlaySpriteColor
-
square
-
targetAlpha
public float[] targetAlpha -
rerouteCollide
-
table
-
name
public java.lang.String name -
lastRendered
-
lastRenderedRendered
-
tintr
public float tintr -
tintg
public float tintg -
tintb
public float tintb -
stCol
-
spriteName
public java.lang.String spriteName -
sx
public int sx -
sy
public int sy -
externalWaterSource
-
usesExternalWaterSource
protected boolean usesExternalWaterSource -
rmod
public static float rmod -
gmod
public static float gmod -
bmod
public static float bmod
-
-
Constructor Details
-
IsoObject
-
IsoObject
public IsoObject() -
IsoObject
-
IsoObject
-
IsoObject
-
IsoObject
public IsoObject(IsoGridSquare square, java.lang.String tile, java.lang.String name, boolean bShareTilesWithMap) -
IsoObject
-
IsoObject
-
-
Method Details
-
DoChecksumCheck
public static boolean DoChecksumCheck(java.lang.String str, java.lang.String expected) -
syncIsoObject
-
syncIsoObjectSend
-
getTextureName
public java.lang.String getTextureName() -
DoChecksumCheck
public static boolean DoChecksumCheck() -
createChecksum
public static byte[] createChecksum(java.lang.String filename) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMD5Checksum
public static java.lang.String getMD5Checksum(java.lang.String filename) throws java.lang.Exception- Throws:
java.lang.Exception
-
getLastRendered
-
setLastRendered
-
getLastRenderedRendered
-
setLastRenderedRendered
-
setDefaultCondition
public static void setDefaultCondition(int i) -
Serialize
public boolean Serialize() -
getModData
-
hasModData
public boolean hasModData() -
getNew
-
factoryFromFileInput
-
factoryClassFromFileInput
-
factoryFromFileInput
public static IsoObject factoryFromFileInput(IsoCell cell, java.nio.ByteBuffer b) throws java.io.IOException- Throws:
java.io.IOException
-
getSquare
-
update
public void update() -
renderlast
public void renderlast() -
DirtySlice
public void DirtySlice() -
getObjectName
public java.lang.String getObjectName() -
load
public void load(java.nio.ByteBuffer input, int WorldVersion) throws java.io.IOException- Throws:
java.io.IOException
-
save
public void save(java.nio.ByteBuffer output) throws java.io.IOException- Throws:
java.io.IOException
-
AttackObject
-
onMouseRightClick
public void onMouseRightClick(int lx, int ly) -
onMouseRightReleased
public void onMouseRightReleased() -
getRerouteCollide
-
setRerouteCollide
-
getTable
-
setTable
-
getAlpha
public float getAlpha() -
setAlpha
public void setAlpha(float alpha) -
getAlphaStep
public float getAlphaStep() -
setAlphaStep
public void setAlphaStep(float alphaStep) -
getAttachedAnimSprite
public java.util.ArrayList getAttachedAnimSprite() -
setAttachedAnimSprite
public void setAttachedAnimSprite(java.util.ArrayList AttachedAnimSprite) -
getCell
-
getChildSprites
public java.util.ArrayList getChildSprites() -
setChildSprites
public void setChildSprites(java.util.ArrayList AttachedAnimSprite) -
getContainer
-
setContainer
-
getDir
-
setDir
-
setDir
public void setDir(int dir) -
getDamage
public short getDamage() -
setDamage
public void setDamage(short Damage) -
isNoPicking
public boolean isNoPicking() -
setNoPicking
public void setNoPicking(boolean NoPicking) -
setOffsetX
public void setOffsetX(float offsetX) -
setOffsetY
public void setOffsetY(float offsetY) -
isOutlineOnMouseover
public boolean isOutlineOnMouseover() -
setOutlineOnMouseover
public void setOutlineOnMouseover(boolean OutlineOnMouseover) -
getRerouteMask
-
setRerouteMask
-
getSprite
-
setSprite
-
setSprite
public void setSprite(java.lang.String name) -
setSpriteFromName
public void setSpriteFromName(java.lang.String name) -
setSquare
-
getTargetAlpha
public float getTargetAlpha() -
setTargetAlpha
public void setTargetAlpha(float targetAlpha) -
setName
public void setName(java.lang.String name) -
getType
-
setType
-
addChild
-
debugPrintout
public void debugPrintout() -
reset
public void reset() -
SetName
public void SetName(java.lang.String name) -
getName
public java.lang.String getName() -
getSpriteName
public java.lang.String getSpriteName() -
getTile
public java.lang.String getTile() -
isCharacter
public boolean isCharacter() -
isZombie
public boolean isZombie() -
getScriptName
public java.lang.String getScriptName() -
AttachAnim
public void AttachAnim(java.lang.String ObjectName, java.lang.String AnimName, int NumFrames, float frameIncrease, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias, ColorInfo TintMod) -
AttachExistingAnim
-
AttachExistingAnim
public void AttachExistingAnim(IsoSprite spr, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias) -
DoTooltip
-
DoSpecialTooltip
-
getItemContainer
-
getOffsetX
public float getOffsetX() -
getOffsetY
public float getOffsetY() -
getRerouteMaskObject
-
HasTooltip
public boolean HasTooltip() -
setUsesExternalWaterSource
public void setUsesExternalWaterSource(boolean b) -
getUsesExternalWaterSource
public boolean getUsesExternalWaterSource() -
hasExternalWaterSource
public boolean hasExternalWaterSource() -
doFindExternalWaterSource
public void doFindExternalWaterSource() -
FindExternalWaterSource
-
setWaterAmount
public void setWaterAmount(int units) -
getWaterAmount
public int getWaterAmount() -
useWater
public int useWater(int amount) -
hasWater
public boolean hasWater() -
replaceItem
-
useItemOn
-
getX
public float getX() -
getY
public float getY() -
getZ
public float getZ() -
onMouseLeftClick
public boolean onMouseLeftClick(int x, int y) -
getProperties
-
RemoveAttachedAnims
public void RemoveAttachedAnims() -
RemoveAttachedAnim
public void RemoveAttachedAnim(int index) -
getFacingPosition
-
getFacingPositionAlt
-
getRenderYOffset
public float getRenderYOffset() -
setRenderYOffset
public void setRenderYOffset(float f) -
isTableSurface
public boolean isTableSurface() -
isTableTopObject
public boolean isTableTopObject() -
getIsSurfaceNormalOffset
public boolean getIsSurfaceNormalOffset() -
getSurfaceNormalOffset
public float getSurfaceNormalOffset() -
getSurfaceOffset
public float getSurfaceOffset() -
render
-
render
public void render(float x, float y, float z, ColorInfo col, boolean bDoAttached, boolean bWallLightingPass) -
renderObjectPicker
-
TestPathfindCollide
-
TestCollide
-
TestVision
-
isMaskClicked
public boolean isMaskClicked(int x, int y) -
isMaskClicked
public boolean isMaskClicked(int x, int y, boolean flip) -
getMaskClickedY
public float getMaskClickedY(int x, int y, boolean flip) -
setCustomColor
-
getCustomColor
-
setCustomColor
public void setCustomColor(float r, float g, float b, float a) -
loadFromRemoteBuffer
public void loadFromRemoteBuffer(java.nio.ByteBuffer b) -
loadFromRemoteBuffer
public void loadFromRemoteBuffer(java.nio.ByteBuffer b, boolean addToObjects) -
addToWorld
public void addToWorld() -
removeFromWorld
public void removeFromWorld() -
reuseGridSquare
public void reuseGridSquare() -
removeFromSquare
public void removeFromSquare() -
transmitCustomColor
public void transmitCustomColor() -
transmitCompleteItemToClients
public void transmitCompleteItemToClients() -
transmitUpdatedSpriteToClients
-
transmitUpdatedSpriteToClients
public void transmitUpdatedSpriteToClients() -
sendObjectChange
public void sendObjectChange(java.lang.String change) -
sendObjectChange
-
sendObjectChange
public void sendObjectChange(java.lang.String change, java.lang.Object[] args) -
saveChange
-
loadChange
public void loadChange(java.lang.String change, java.nio.ByteBuffer bb) -
transmitUpdatedSpriteToServer
public void transmitUpdatedSpriteToServer() -
transmitCompleteItemToServer
public void transmitCompleteItemToServer() -
transmitModData
public void transmitModData() -
writeToRemoteBuffer
-
getObjectIndex
public int getObjectIndex() -
getSpecialObjectIndex
public int getSpecialObjectIndex() -
getStaticMovingObjectIndex
public int getStaticMovingObjectIndex() -
getWorldObjectIndex
public int getWorldObjectIndex() -
getOverlaySprite
-
setOverlaySpriteColor
public void setOverlaySpriteColor(float r, float g, float b, float a) -
getOverlaySpriteColor
-
setOverlaySprite
public void setOverlaySprite(java.lang.String spriteName) -
setOverlaySprite
public void setOverlaySprite(java.lang.String spriteName, float r, float g, float b, float a) -
setOverlaySprite
public boolean setOverlaySprite(java.lang.String spriteName, float r, float g, float b, float a, boolean bTransmit) -
haveSpecialTooltip
public boolean haveSpecialTooltip() -
setSpecialTooltip
public void setSpecialTooltip(boolean specialTooltip) -
getKeyId
public int getKeyId() -
setKeyId
public void setKeyId(int keyId) -
setHighlighted
public void setHighlighted(boolean highlight) -
getHighlightColor
-
setHighlightColor
-
isBlink
public boolean isBlink() -
setBlink
public void setBlink(boolean blink) -
checkHaveElectricity
public void checkHaveElectricity() -
getContainerCount
public int getContainerCount() -
getContainerByIndex
-
getContainerByType
-
getContainerByEitherType
-
addSecondaryContainer
-
getContainerIndex
-
removeAllContainers
public void removeAllContainers() -
createContainersFromSpriteProperties
public void createContainersFromSpriteProperties()
-