Package zombie.iso

Class IsoMovingObject

java.lang.Object
zombie.iso.IsoObject
zombie.iso.IsoMovingObject
All Implemented Interfaces:
Serializable, Mover, Thumpable
Direct Known Subclasses:
BaseVehicle, IsoDeadBody, IsoGameCharacter, IsoPhysicsObject, IsoPushableObject, IsoZombieHead

public class IsoMovingObject extends IsoObject implements Mover
See Also:
  • Field Details

    • treeSoundMgr

      public static IsoMovingObject.TreeSoundManager treeSoundMgr
    • MAX_ZOMBIES_EATING

      public static final int MAX_ZOMBIES_EATING
      See Also:
    • noDamage

      public boolean noDamage
    • last

      public IsoGridSquare last
    • lx

      public float lx
    • ly

      public float ly
    • lz

      public float lz
    • nx

      public float nx
    • ny

      public float ny
    • x

      public float x
    • y

      public float y
    • z

      public float z
    • def

      public IsoSpriteInstance def
    • bOutline

      public final boolean[] bOutline
    • outlineColor

      public final ColorInfo[] outlineColor
  • Constructor Details

    • IsoMovingObject

      public IsoMovingObject(IsoCell cell)
    • IsoMovingObject

      public IsoMovingObject(IsoCell cell, boolean bObjectListAdd)
    • IsoMovingObject

      public IsoMovingObject(IsoCell cell, IsoGridSquare square, IsoSprite spr, boolean bObjectListAdd)
    • IsoMovingObject

      public IsoMovingObject()
  • Method Details

    • getIDCount

      public static int getIDCount()
      Returns:
      the IDCount
    • setIDCount

      public static void setIDCount(int aIDCount)
      Parameters:
      aIDCount - the IDCount to set
    • getBuilding

      public IsoBuilding getBuilding()
    • getMasterRegion

      public IWorldRegion getMasterRegion()
    • getWeight

      public float getWeight()
    • setWeight

      public void setWeight(float weight)
      Parameters:
      weight - the weight to set
    • getWeight

      public float getWeight(float x, float y)
    • onMouseRightClick

      public void onMouseRightClick(int lx, int ly)
      Overrides:
      onMouseRightClick in class IsoObject
    • getObjectName

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

      public void onMouseRightReleased()
      Overrides:
      onMouseRightReleased in class IsoObject
    • collideWith

      public void collideWith(IsoObject obj)
    • doStairs

      public void doStairs()
    • getID

      public int getID()
      Specified by:
      getID in interface Mover
    • setID

      public void setID(int ID)
      Parameters:
      ID - the ID to set
    • getPathFindIndex

      public int getPathFindIndex()
      Specified by:
      getPathFindIndex in interface Mover
    • setPathFindIndex

      public void setPathFindIndex(int PathFindIndex)
      Parameters:
      PathFindIndex - the PathFindIndex to set
    • getScreenX

      public float getScreenX()
    • getScreenY

      public float getScreenY()
    • getThumpTarget

      public Thumpable getThumpTarget()
    • setThumpTarget

      public void setThumpTarget(Thumpable thumpTarget)
      Parameters:
      thumpTarget - the thumpTarget to set
    • getVectorFromDirection

      public Vector2 getVectorFromDirection(Vector2 moveForwardVec)
    • getVectorFromDirection

      public static Vector2 getVectorFromDirection(Vector2 moveForwardVec, IsoDirections dir)
    • getPosition

      public Vector3 getPosition(Vector3 out)
      Get the object's position. Stored in the supplied parameter.
      Returns:
      The out parameter.
    • getX

      public float getX()
      Overrides:
      getX in class IsoObject
    • setX

      public void setX(float x)
      Parameters:
      x - the x to set
    • getY

      public float getY()
      Overrides:
      getY in class IsoObject
    • setY

      public void setY(float y)
      Parameters:
      y - the y to set
    • getZ

      public float getZ()
      Overrides:
      getZ in class IsoObject
    • setZ

      public void setZ(float z)
      Parameters:
      z - the z to set
    • getSquare

      public IsoGridSquare getSquare()
      Overrides:
      getSquare in class IsoObject
    • getCurrentBuilding

      public IsoBuilding getCurrentBuilding()
    • Hit

      public float Hit(HandWeapon weapon, IsoGameCharacter wielder, float damageSplit, boolean bIgnoreDamage, float modDelta)
    • Move

      public void Move(Vector2 dir)
    • MoveUnmodded

      public void MoveUnmodded(Vector2 dir)
    • isCharacter

      public boolean isCharacter()
      Overrides:
      isCharacter in class IsoObject
    • DistTo

      public float DistTo(int x, int y)
    • DistTo

      public float DistTo(IsoMovingObject other)
    • DistToProper

      public float DistToProper(IsoObject other)
    • DistToSquared

      public float DistToSquared(IsoMovingObject other)
    • DistToSquared

      public float DistToSquared(float x, float y)
    • 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
    • removeFromWorld

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

      public void removeFromSquare()
      Overrides:
      removeFromSquare in class IsoObject
    • getFuturWalkedSquare

      public IsoGridSquare getFuturWalkedSquare()
    • getGlobalMovementMod

      public float getGlobalMovementMod()
    • getGlobalMovementMod

      public float getGlobalMovementMod(boolean bDoNoises)
    • postupdate

      public void postupdate()
    • ensureOnTile

      public void ensureOnTile()
    • preupdate

      public void preupdate()
    • renderlast

      public void renderlast()
      Overrides:
      renderlast in class IsoObject
    • spotted

      public void spotted(IsoMovingObject other, boolean bForced)
    • update

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

      public int compareToY(IsoMovingObject other)
    • distToNearestCamCharacter

      public float distToNearestCamCharacter()
    • isSolidForSeparate

      public boolean isSolidForSeparate()
    • isPushableForSeparate

      public boolean isPushableForSeparate()
    • isPushedByForSeparate

      public boolean isPushedByForSeparate(IsoMovingObject other)
    • separate

      public void separate()
      Collision detection
    • getBumpedType

      public String getBumpedType(IsoGameCharacter bumped)
    • setMovingSquareNow

      public void setMovingSquareNow()
    • getFeelerTile

      public IsoGridSquare getFeelerTile(float dist)
    • DoCollideNorS

      public void DoCollideNorS()
    • DoCollideWorE

      public void DoCollideWorE()
    • getTimeSinceZombieAttack

      public int getTimeSinceZombieAttack()
      Returns:
      the TimeSinceZombieAttack
    • setTimeSinceZombieAttack

      public void setTimeSinceZombieAttack(int TimeSinceZombieAttack)
      Parameters:
      TimeSinceZombieAttack - the TimeSinceZombieAttack to set
    • isCollidedE

      public boolean isCollidedE()
      Returns:
      the collidedE
    • setCollidedE

      public void setCollidedE(boolean collidedE)
      Parameters:
      collidedE - the collidedE to set
    • isCollidedN

      public boolean isCollidedN()
      Returns:
      the collidedN
    • setCollidedN

      public void setCollidedN(boolean collidedN)
      Parameters:
      collidedN - the collidedN to set
    • getCollidedObject

      public IsoObject getCollidedObject()
      Returns:
      the CollidedObject
    • setCollidedObject

      public void setCollidedObject(IsoObject CollidedObject)
      Parameters:
      CollidedObject - the CollidedObject to set
    • isCollidedS

      public boolean isCollidedS()
      Returns:
      the collidedS
    • setCollidedS

      public void setCollidedS(boolean collidedS)
      Parameters:
      collidedS - the collidedS to set
    • isCollidedThisFrame

      public boolean isCollidedThisFrame()
      Returns:
      the collidedThisFrame
    • setCollidedThisFrame

      public void setCollidedThisFrame(boolean collidedThisFrame)
      Parameters:
      collidedThisFrame - the collidedThisFrame to set
    • isCollidedW

      public boolean isCollidedW()
      Returns:
      the collidedW
    • setCollidedW

      public void setCollidedW(boolean collidedW)
      Parameters:
      collidedW - the collidedW to set
    • isCollidedWithDoor

      public boolean isCollidedWithDoor()
      Returns:
      the CollidedWithDoor
    • setCollidedWithDoor

      public void setCollidedWithDoor(boolean CollidedWithDoor)
      Parameters:
      CollidedWithDoor - the CollidedWithDoor to set
    • isCollidedWithVehicle

      public boolean isCollidedWithVehicle()
    • getCurrentSquare

      public IsoGridSquare getCurrentSquare()
      Returns:
      the current
    • getCurrentZone

      public IsoMetaGrid.Zone getCurrentZone()
    • setCurrent

      public void setCurrent(IsoGridSquare current)
      Parameters:
      current - the current to set
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Thumpable
      Overrides:
      isDestroyed in class IsoObject
      Returns:
      the destroyed
    • setDestroyed

      public void setDestroyed(boolean destroyed)
      Parameters:
      destroyed - the destroyed to set
    • isFirstUpdate

      public boolean isFirstUpdate()
      Returns:
      the firstUpdate
    • setFirstUpdate

      public void setFirstUpdate(boolean firstUpdate)
      Parameters:
      firstUpdate - the firstUpdate to set
    • getHitDir

      public Vector2 getHitDir()
      Returns:
      the hitDir
    • setHitDir

      public void setHitDir(Vector2 hitDir)
      Parameters:
      hitDir - the hitDir to set
    • getImpulsex

      public float getImpulsex()
      Returns:
      the impulsex
    • setImpulsex

      public void setImpulsex(float impulsex)
      Parameters:
      impulsex - the impulsex to set
    • getImpulsey

      public float getImpulsey()
      Returns:
      the impulsey
    • setImpulsey

      public void setImpulsey(float impulsey)
      Parameters:
      impulsey - the impulsey to set
    • getLimpulsex

      public float getLimpulsex()
      Returns:
      the limpulsex
    • setLimpulsex

      public void setLimpulsex(float limpulsex)
      Parameters:
      limpulsex - the limpulsex to set
    • getLimpulsey

      public float getLimpulsey()
      Returns:
      the limpulsey
    • setLimpulsey

      public void setLimpulsey(float limpulsey)
      Parameters:
      limpulsey - the limpulsey to set
    • getHitForce

      public float getHitForce()
      Returns:
      the hitForce
    • setHitForce

      public void setHitForce(float hitForce)
      Parameters:
      hitForce - the hitForce to set
    • getHitFromAngle

      public float getHitFromAngle()
      Returns:
      the hitFromAngle
    • setHitFromAngle

      public void setHitFromAngle(float hitFromAngle)
      Parameters:
      hitFromAngle - the hitFromAngle to set
    • getLastSquare

      public IsoGridSquare getLastSquare()
      Returns:
      the last
    • setLast

      public void setLast(IsoGridSquare last)
      Parameters:
      last - the last to set
    • getLx

      public float getLx()
      Returns:
      the lx
    • setLx

      public void setLx(float lx)
      Parameters:
      lx - the lx to set
    • getLy

      public float getLy()
      Returns:
      the ly
    • setLy

      public void setLy(float ly)
      Parameters:
      ly - the ly to set
    • getLz

      public float getLz()
      Returns:
      the lz
    • setLz

      public void setLz(float lz)
      Parameters:
      lz - the lz to set
    • getNx

      public float getNx()
      Returns:
      the nx
    • setNx

      public void setNx(float nx)
      Parameters:
      nx - the nx to set
    • getNy

      public float getNy()
      Returns:
      the ny
    • setNy

      public void setNy(float ny)
      Parameters:
      ny - the ny to set
    • getNoDamage

      public boolean getNoDamage()
      Returns:
      whether the object should take damage or not.
    • setNoDamage

      public void setNoDamage(boolean dmg)
      Parameters:
      dmg - whether the object should take damage.
    • isSolid

      public boolean isSolid()
      Returns:
      the solid
    • setSolid

      public void setSolid(boolean solid)
      Parameters:
      solid - the solid to set
    • getStateEventDelayTimer

      public float getStateEventDelayTimer()
      Returns:
      the StateEventDelayTimer
    • setStateEventDelayTimer

      public void setStateEventDelayTimer(float StateEventDelayTimer)
      Parameters:
      StateEventDelayTimer - the StateEventDelayTimer to set
    • getWidth

      public float getWidth()
      Returns:
      the width
    • setWidth

      public void setWidth(float width)
      Parameters:
      width - the width to set
    • isbAltCollide

      public boolean isbAltCollide()
      Returns:
      the bAltCollide
    • setbAltCollide

      public void setbAltCollide(boolean bAltCollide)
      Parameters:
      bAltCollide - the bAltCollide to set
    • isShootable

      public boolean isShootable()
      Returns:
      the shootable
    • setShootable

      public void setShootable(boolean shootable)
      Parameters:
      shootable - the shootable to set
    • getLastTargettedBy

      public IsoZombie getLastTargettedBy()
      Returns:
      the lastTargettedBy
    • setLastTargettedBy

      public void setLastTargettedBy(IsoZombie lastTargettedBy)
      Parameters:
      lastTargettedBy - the lastTargettedBy to set
    • isCollidable

      public boolean isCollidable()
      Returns:
      the Collidable
    • setCollidable

      public void setCollidable(boolean Collidable)
      Parameters:
      Collidable - the Collidable to set
    • getScriptnx

      public float getScriptnx()
      Returns:
      the scriptnx
    • setScriptnx

      public void setScriptnx(float scriptnx)
      Parameters:
      scriptnx - the scriptnx to set
    • getScriptny

      public float getScriptny()
      Returns:
      the scriptny
    • setScriptny

      public void setScriptny(float scriptny)
      Parameters:
      scriptny - the scriptny to set
    • getScriptModule

      public String getScriptModule()
      Returns:
      the ScriptModule
    • setScriptModule

      public void setScriptModule(String ScriptModule)
      Parameters:
      ScriptModule - the ScriptModule to set
    • getMovementLastFrame

      public Vector2 getMovementLastFrame()
      Returns:
      the movementLastFrame
    • setMovementLastFrame

      public void setMovementLastFrame(Vector2 movementLastFrame)
      Parameters:
      movementLastFrame - the movementLastFrame to set
    • getFeelersize

      public float getFeelersize()
      Returns:
      the feelersize
    • setFeelersize

      public void setFeelersize(float feelersize)
      Parameters:
      feelersize - the feelersize to set
    • canHaveMultipleHits

      public byte canHaveMultipleHits()
      This function calculate count of attackers
      Returns:
      0 - no attackets, 1 - one player can attack this character, 2 - multiply players can attack this character
    • isOnFloor

      public boolean isOnFloor()
    • setOnFloor

      public void setOnFloor(boolean bOnFloor)
    • Despawn

      public void Despawn()
    • isCloseKilled

      public boolean isCloseKilled()
    • setCloseKilled

      public void setCloseKilled(boolean closeKilled)
    • getFacingPosition

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

      public boolean isCollided()
    • getCollideType

      public String getCollideType()
    • setCollideType

      public void setCollideType(String collideType)
    • getLastCollideTime

      public float getLastCollideTime()
    • setLastCollideTime

      public void setLastCollideTime(float lastCollideTime)
    • getEatingZombies

      public ArrayList<IsoZombie> getEatingZombies()
    • setEatingZombies

      public void setEatingZombies(ArrayList<IsoZombie> zeds)
    • isEatingOther

      public boolean isEatingOther(IsoMovingObject other)
    • getDistanceSq

      public float getDistanceSq(IsoMovingObject other)
    • setZombiesDontAttack

      public void setZombiesDontAttack(boolean b)
    • isZombiesDontAttack

      public boolean isZombiesDontAttack()