Class IsoThumpable

java.lang.Object
zombie.iso.IsoObject
zombie.iso.objects.IsoThumpable
All Implemented Interfaces:
Serializable, BarricadeAble, Thumpable

public class IsoThumpable extends IsoObject implements BarricadeAble, Thumpable
See Also:
  • Field Details

    • isDoor

      public Boolean isDoor
    • isDoorFrame

      public Boolean isDoorFrame
    • breakSound

      public String breakSound
    • Locked

      public boolean Locked
    • MaxHealth

      public int MaxHealth
    • Health

      public int Health
    • PushedMaxStrength

      public int PushedMaxStrength
    • PushedStrength

      public int PushedStrength
    • north

      public boolean north
    • open

      public boolean open
    • canPassThrough

      public boolean canPassThrough
    • keyId

      public int keyId
    • lockedByPadlock

      public boolean lockedByPadlock
    • lockedByCode

      public int lockedByCode
    • OldNumPlanks

      public int OldNumPlanks
    • thumpSound

      public String thumpSound
    • tempo

      public static final Vector2 tempo
  • Constructor Details

    • IsoThumpable

      public IsoThumpable(IsoCell cell)
    • IsoThumpable

      public IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String closedSprite, String openSprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
      Create an object than can be interacted by you, survivor or zombie (destroy, barricade, etc.) This one have a closed/openSprite so it can be a door for example
      Parameters:
      cell -
      gridSquare -
      openSprite -
      closedSprite -
      north -
      table -
    • IsoThumpable

      public IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String sprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
      Create an object than can be interacted by you, survivor or zombie (destroy, barricade, etc.) This one can be a wall, a fence, etc.
      Parameters:
      cell -
      gridSquare -
      sprite -
      north -
      table -
  • Method Details

    • getModData

      public se.krka.kahlua.vm.KahluaTable getModData()
      Overrides:
      getModData in class IsoObject
    • setModData

      public void setModData(se.krka.kahlua.vm.KahluaTable modData)
    • hasModData

      public boolean hasModData()
      Overrides:
      hasModData in class IsoObject
    • isCanPassThrough

      public boolean isCanPassThrough()
      Can you pass through the item, if false we gonna test the collide default to false (so it collide)
      Returns:
    • setCanPassThrough

      public void setCanPassThrough(boolean pCanPassThrough)
    • isBlockAllTheSquare

      public boolean isBlockAllTheSquare()
    • setBlockAllTheSquare

      public void setBlockAllTheSquare(boolean blockAllTheSquare)
    • setIsDismantable

      public void setIsDismantable(boolean dismantable)
    • isDismantable

      public boolean isDismantable()
    • getCrossSpeed

      public float getCrossSpeed()
    • setCrossSpeed

      public void setCrossSpeed(float pCrossSpeed)
    • setIsFloor

      public void setIsFloor(boolean pIsFloor)
    • isCorner

      public boolean isCorner()
    • isFloor

      public boolean isFloor()
      Overrides:
      isFloor in class IsoObject
    • setIsContainer

      public void setIsContainer(boolean pIsContainer)
    • setIsStairs

      public void setIsStairs(boolean pStairs)
    • isStairs

      public boolean isStairs()
    • isWindow

      public boolean isWindow()
    • getObjectName

      public String getObjectName()
      Overrides:
      getObjectName in class IsoObject
    • setCorner

      public void setCorner(boolean pCorner)
    • setCanBarricade

      public void setCanBarricade(boolean pCanBarricade)
      Can you barricade/unbarricade the item default true
    • getCanBarricade

      public boolean getCanBarricade()
      Can you barricade/unbarricade the item
      Returns:
    • setHealth

      public void setHealth(int health)
    • getHealth

      public int getHealth()
    • setMaxHealth

      public void setMaxHealth(int maxHealth)
    • getMaxHealth

      public int getMaxHealth()
    • setThumpDmg

      public void setThumpDmg(Integer pThumpDmg)
      Numbers of zeds need to hurt the object default 8
      Parameters:
      pThumpDmg -
    • getThumpDmg

      public int getThumpDmg()
    • setBreakSound

      public void setBreakSound(String pBreakSound)
      The sound that be played if this object is broken default "BreakDoor"
      Parameters:
      pBreakSound -
    • getBreakSound

      public String getBreakSound()
    • isDoor

      public boolean isDoor()
    • getNorth

      public boolean getNorth()
      Specified by:
      getNorth in interface BarricadeAble
    • getFacingPosition

      public Vector2 getFacingPosition(Vector2 pos)
      Overrides:
      getFacingPosition in class IsoObject
    • isDoorFrame

      public boolean isDoorFrame()
    • setIsDoor

      public void setIsDoor(boolean pIsDoor)
    • setIsDoorFrame

      public void setIsDoorFrame(boolean pIsDoorFrame)
    • setSprite

      public void setSprite(String sprite)
      Overrides:
      setSprite in class IsoObject
    • setSpriteFromName

      public void setSpriteFromName(String name)
      Overrides:
      setSpriteFromName in class IsoObject
    • setClosedSprite

      public void setClosedSprite(IsoSprite sprite)
    • setOpenSprite

      public void setOpenSprite(IsoSprite sprite)
    • load

      public void load(ByteBuffer input, int WorldVersion, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      load in class IsoObject
      Throws:
      IOException
    • save

      public void save(ByteBuffer output, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      save in class IsoObject
      Throws:
      IOException
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Thumpable
      Overrides:
      isDestroyed in class IsoObject
    • IsOpen

      public boolean IsOpen()
    • IsStrengthenedByPushedItems

      public boolean IsStrengthenedByPushedItems()
    • onMouseLeftClick

      public boolean onMouseLeftClick(int x, int y)
      Overrides:
      onMouseLeftClick in class IsoObject
    • TestPathfindCollide

      public boolean TestPathfindCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestPathfindCollide in class IsoObject
    • TestCollide

      public boolean TestCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestCollide in class IsoObject
    • TestVision

      public IsoObject.VisionResult TestVision(IsoGridSquare from, IsoGridSquare to)
      Overrides:
      TestVision in class IsoObject
    • Thump

      public void Thump(IsoMovingObject thumper)
      Specified by:
      Thump in interface Thumpable
      Overrides:
      Thump in class IsoObject
    • getThumpableFor

      public Thumpable getThumpableFor(IsoGameCharacter chr)
      Specified by:
      getThumpableFor in interface Thumpable
      Overrides:
      getThumpableFor in class IsoObject
    • getThumpCondition

      public float getThumpCondition()
      Specified by:
      getThumpCondition in interface Thumpable
      Overrides:
      getThumpCondition in class IsoObject
    • WeaponHit

      public void WeaponHit(IsoGameCharacter owner, HandWeapon weapon)
      Specified by:
      WeaponHit in interface Thumpable
      Overrides:
      WeaponHit in class IsoObject
    • getOtherSideOfDoor

      public IsoGridSquare getOtherSideOfDoor(IsoGameCharacter chr)
    • ToggleDoorActual

      public void ToggleDoorActual(IsoGameCharacter chr)
    • ToggleDoor

      public void ToggleDoor(IsoGameCharacter chr)
    • ToggleDoorSilent

      public void ToggleDoorSilent()
    • isObstructed

      public boolean isObstructed()
    • haveSheetRope

      public boolean haveSheetRope()
      Overrides:
      haveSheetRope in class IsoObject
    • countAddSheetRope

      public int countAddSheetRope()
      Overrides:
      countAddSheetRope in class IsoObject
    • canAddSheetRope

      public boolean canAddSheetRope()
      Overrides:
      canAddSheetRope in class IsoObject
    • addSheetRope

      public boolean addSheetRope(IsoPlayer player, String itemType)
      Overrides:
      addSheetRope in class IsoObject
    • removeSheetRope

      public boolean removeSheetRope(IsoPlayer player)
      Overrides:
      removeSheetRope in class IsoObject
    • createLightSource

      public void createLightSource(int radius, int offsetX, int offsetY, int offsetZ, int life, String lightSourceFuel, InventoryItem baseItem, IsoGameCharacter chr)
    • insertNewFuel

      public InventoryItem insertNewFuel(InventoryItem item, IsoGameCharacter chr)
    • removeCurrentFuel

      public InventoryItem removeCurrentFuel(IsoGameCharacter chr)
    • update

      public void update()
      Overrides:
      update in class IsoObject
    • destroy

      public void destroy()
    • getBarricadeOnSameSquare

      public IsoBarricade getBarricadeOnSameSquare()
      Specified by:
      getBarricadeOnSameSquare in interface BarricadeAble
    • getBarricadeOnOppositeSquare

      public IsoBarricade getBarricadeOnOppositeSquare()
      Specified by:
      getBarricadeOnOppositeSquare in interface BarricadeAble
    • isBarricaded

      public boolean isBarricaded()
      Specified by:
      isBarricaded in interface BarricadeAble
    • isBarricadeAllowed

      public boolean isBarricadeAllowed()
      Specified by:
      isBarricadeAllowed in interface BarricadeAble
    • getBarricadeForCharacter

      public IsoBarricade getBarricadeForCharacter(IsoGameCharacter chr)
      Specified by:
      getBarricadeForCharacter in interface BarricadeAble
    • getBarricadeOppositeCharacter

      public IsoBarricade getBarricadeOppositeCharacter(IsoGameCharacter chr)
      Specified by:
      getBarricadeOppositeCharacter in interface BarricadeAble
    • setIsDoor

      public void setIsDoor(Boolean pIsDoor)
    • getTable

      public se.krka.kahlua.vm.KahluaTable getTable()
      Overrides:
      getTable in class IsoObject
      Returns:
      the table
    • setTable

      public void setTable(se.krka.kahlua.vm.KahluaTable table)
      Overrides:
      setTable in class IsoObject
      Parameters:
      table - the table to set
    • canBePlastered

      public boolean canBePlastered()
    • setCanBePlastered

      public void setCanBePlastered(boolean canBePlastered)
    • isPaintable

      public boolean isPaintable()
    • setPaintable

      public void setPaintable(boolean paintable)
    • isLocked

      public boolean isLocked()
    • setIsLocked

      public void setIsLocked(boolean lock)
    • isThumpable

      public boolean isThumpable()
    • setIsThumpable

      public void setIsThumpable(boolean thumpable)
    • setIsHoppable

      public void setIsHoppable(boolean isHoppable)
    • getOpenSprite

      public IsoSprite getOpenSprite()
    • isHoppable

      public boolean isHoppable()
      Overrides:
      isHoppable in class IsoObject
    • setHoppable

      public void setHoppable(boolean isHoppable)
    • getLightSourceRadius

      public int getLightSourceRadius()
    • setLightSourceRadius

      public void setLightSourceRadius(int lightSourceRadius)
    • getLightSourceXOffset

      public int getLightSourceXOffset()
    • setLightSourceXOffset

      public void setLightSourceXOffset(int lightSourceXOffset)
    • getLightSourceYOffset

      public int getLightSourceYOffset()
    • setLightSourceYOffset

      public void setLightSourceYOffset(int lightSourceYOffset)
    • getLightSourceLife

      public int getLightSourceLife()
    • setLightSourceLife

      public void setLightSourceLife(int lightSourceLife)
    • isLightSourceOn

      public boolean isLightSourceOn()
    • setLightSourceOn

      public void setLightSourceOn(boolean lightSourceOn)
    • getLightSource

      public IsoLightSource getLightSource()
    • setLightSource

      public void setLightSource(IsoLightSource lightSource)
    • toggleLightSource

      public void toggleLightSource(boolean toggle)
    • getLightSourceFuel

      public String getLightSourceFuel()
    • setLightSourceFuel

      public void setLightSourceFuel(String lightSourceFuel)
    • getLifeLeft

      public float getLifeLeft()
    • setLifeLeft

      public void setLifeLeft(float lifeLeft)
    • getLifeDelta

      public float getLifeDelta()
    • setLifeDelta

      public void setLifeDelta(float lifeDelta)
    • haveFuel

      public boolean haveFuel()
    • setHaveFuel

      public void setHaveFuel(boolean haveFuel)
    • syncIsoObjectSend

      public void syncIsoObjectSend(ByteBufferWriter b)
      Overrides:
      syncIsoObjectSend in class IsoObject
    • syncIsoObject

      public void syncIsoObject(boolean bRemote, byte val, UdpConnection source, ByteBuffer bb)
      Overrides:
      syncIsoObject in class IsoObject
    • addToWorld

      public void addToWorld()
      Overrides:
      addToWorld in class IsoObject
    • removeFromWorld

      public void removeFromWorld()
      Overrides:
      removeFromWorld in class IsoObject
    • saveChange

      public void saveChange(String change, se.krka.kahlua.vm.KahluaTable tbl, ByteBuffer bb)
      Overrides:
      saveChange in class IsoObject
    • loadChange

      public void loadChange(String change, ByteBuffer bb)
      Overrides:
      loadChange in class IsoObject
    • HasCurtains

      public IsoCurtain HasCurtains()
    • getInsideSquare

      public IsoGridSquare getInsideSquare()
    • getOppositeSquare

      public IsoGridSquare getOppositeSquare()
      Specified by:
      getOppositeSquare in interface BarricadeAble
    • isAdjacentToSquare

      public boolean isAdjacentToSquare(IsoGridSquare square2)
    • getAddSheetSquare

      public IsoGridSquare getAddSheetSquare(IsoGameCharacter chr)
    • addSheet

      public void addSheet(IsoGameCharacter chr)
    • getIndoorSquare

      public IsoGridSquare getIndoorSquare()
    • getKeyId

      public int getKeyId()
      Overrides:
      getKeyId in class IsoObject
    • setKeyId

      public void setKeyId(int keyId, boolean doNetwork)
    • setKeyId

      public void setKeyId(int keyId)
      Overrides:
      setKeyId in class IsoObject
    • isLockedByKey

      public boolean isLockedByKey()
    • setLockedByKey

      public void setLockedByKey(boolean lockedByKey)
    • isLockedByPadlock

      public boolean isLockedByPadlock()
    • syncIsoThumpable

      public void syncIsoThumpable()
    • setLockedByPadlock

      public void setLockedByPadlock(boolean lockedByPadlock)
    • canBeLockByPadlock

      public boolean canBeLockByPadlock()
    • setCanBeLockByPadlock

      public void setCanBeLockByPadlock(boolean canBeLockByPadlock)
    • getLockedByCode

      public int getLockedByCode()
    • setLockedByCode

      public void setLockedByCode(int lockedByCode)
    • isLockedToCharacter

      public boolean isLockedToCharacter(IsoGameCharacter chr)
    • canClimbOver

      public boolean canClimbOver(IsoGameCharacter chr)
    • canClimbThrough

      public boolean canClimbThrough(IsoGameCharacter chr)
    • getThumpSound

      public String getThumpSound()
    • setThumpSound

      public void setThumpSound(String thumpSound)
    • getRenderEffectMaster

      public IsoObject getRenderEffectMaster()
      Overrides:
      getRenderEffectMaster in class IsoObject
    • getSpriteEdge

      public IsoDirections getSpriteEdge(boolean ignoreOpen)