Class 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 TreeSoundManager treeSoundMgr
    • MAX_ZOMBIES_EATING

      public static final int MAX_ZOMBIES_EATING
      See Also:
    • noDamage

      public boolean noDamage
    • last

      public IsoGridSquare last
    • reqMovement

      public Vector2 reqMovement
    • def

      public IsoSpriteInstance def
    • current

      protected IsoGridSquare current
    • hitDir

      protected Vector2 hitDir
    • ID

      protected int ID
    • movingSq

      protected IsoGridSquare movingSq
    • solid

      protected boolean solid
    • width

      protected float width
    • shootable

      protected boolean shootable
    • Collidable

      protected boolean Collidable
    • ScriptModule

      protected String ScriptModule
    • movementLastFrame

      protected Vector2 movementLastFrame
    • weight

      protected float weight
  • 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

    • toString

      public String toString()
      Overrides:
      toString in class IsoObject
    • getIDCount

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

      public static void setIDCount(int aIDCount)
    • getBuilding

      public IsoBuilding getBuilding()
    • getMasterRegion

      public IWorldRegion getMasterRegion()
    • getWeight

      public float getWeight()
    • setWeight

      public void setWeight(float _weight)
    • 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)
    • getPathFindIndex

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

      public void setPathFindIndex(int _PathFindIndex)
    • getScreenX

      public float getScreenX()
    • getScreenY

      public float getScreenY()
    • getThumpTarget

      public Thumpable getThumpTarget()
    • setThumpTarget

      public void setThumpTarget(Thumpable _thumpTarget)
    • 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.
    • getPosition

      public org.lwjgl.util.vector.Vector3f getPosition(org.lwjgl.util.vector.Vector3f vector3f)
    • setPosition

      public void setPosition(float float0, float float1)
    • setPosition

      public void setPosition(Vector2 vector2)
    • setPosition

      public void setPosition(float float0, float float1, float float2)
    • getX

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

      public float setX(float float0)
    • setForceX

      public void setForceX(float float0)
    • getY

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

      public float setY(float float0)
    • setForceY

      public void setForceY(float float0)
    • getZ

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

      public float setZ(float float0)
    • 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
    • getDescription

      public String getDescription(String string)
    • 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()
    • updateAnimation

      public void updateAnimation()
    • 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)
    • getLastX

      public float getLastX()
    • setLastX

      public float setLastX(float float0)
    • getLastY

      public float getLastY()
    • setLastY

      public float setLastY(float float0)
    • getLastZ

      public float getLastZ()
    • setLastZ

      public float setLastZ(float float0)
    • getNextX

      public float getNextX()
    • setNextX

      public float setNextX(float float0)
    • getNextY

      public float getNextY()
    • setNextY

      public float setNextY(float float0)
    • getScriptNextX

      public float getScriptNextX()
    • setScriptNextX

      public float setScriptNextX(float float0)
    • getScriptNextY

      public float getScriptNextY()
    • setScriptNextY

      public float setScriptNextY(float float0)
    • 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)
    • isCollidedE

      public boolean isCollidedE()
      Returns:
      the collidedE
    • setCollidedE

      public void setCollidedE(boolean _collidedE)
    • isCollidedN

      public boolean isCollidedN()
      Returns:
      the collidedN
    • setCollidedN

      public void setCollidedN(boolean _collidedN)
    • getCollidedObject

      public IsoObject getCollidedObject()
      Returns:
      the CollidedObject
    • setCollidedObject

      public void setCollidedObject(IsoObject _CollidedObject)
    • isCollidedS

      public boolean isCollidedS()
      Returns:
      the collidedS
    • setCollidedS

      public void setCollidedS(boolean _collidedS)
    • isCollidedThisFrame

      public boolean isCollidedThisFrame()
      Returns:
      the collidedThisFrame
    • setCollidedThisFrame

      public void setCollidedThisFrame(boolean _collidedThisFrame)
    • isCollidedW

      public boolean isCollidedW()
      Returns:
      the collidedW
    • setCollidedW

      public void setCollidedW(boolean _collidedW)
    • isCollidedWithDoor

      public boolean isCollidedWithDoor()
      Returns:
      the CollidedWithDoor
    • setCollidedWithDoor

      public void setCollidedWithDoor(boolean _CollidedWithDoor)
    • isCollidedWithVehicle

      public boolean isCollidedWithVehicle()
    • getCurrentSquare

      public IsoGridSquare getCurrentSquare()
      Returns:
      the current
    • getCurrentZone

      public Zone getCurrentZone()
    • setCurrent

      public void setCurrent(IsoGridSquare _current)
    • isDestroyed

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

      public void setDestroyed(boolean _destroyed)
    • isFirstUpdate

      public boolean isFirstUpdate()
      Returns:
      the firstUpdate
    • setFirstUpdate

      public void setFirstUpdate(boolean _firstUpdate)
    • getHitDir

      public Vector2 getHitDir()
      Returns:
      the hitDir
    • setHitDir

      public void setHitDir(Vector2 _hitDir)
    • getImpulsex

      public float getImpulsex()
      Returns:
      the impulsex
    • setImpulsex

      public void setImpulsex(float _impulsex)
    • getImpulsey

      public float getImpulsey()
      Returns:
      the impulsey
    • setImpulsey

      public void setImpulsey(float _impulsey)
    • getLimpulsex

      public float getLimpulsex()
      Returns:
      the limpulsex
    • setLimpulsex

      public void setLimpulsex(float _limpulsex)
    • getLimpulsey

      public float getLimpulsey()
      Returns:
      the limpulsey
    • setLimpulsey

      public void setLimpulsey(float _limpulsey)
    • getHitForce

      public float getHitForce()
      Returns:
      the hitForce
    • setHitForce

      public void setHitForce(float _hitForce)
    • getHitFromAngle

      public float getHitFromAngle()
      Returns:
      the hitFromAngle
    • setHitFromAngle

      public void setHitFromAngle(float _hitFromAngle)
    • getLastSquare

      public IsoGridSquare getLastSquare()
      Returns:
      the last
    • setLast

      public void setLast(IsoGridSquare _last)
    • getNoDamage

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

      public void setNoDamage(boolean dmg)
    • isSolid

      public boolean isSolid()
      Returns:
      the solid
    • setSolid

      public void setSolid(boolean _solid)
    • getStateEventDelayTimer

      public float getStateEventDelayTimer()
      Returns:
      the StateEventDelayTimer
    • setStateEventDelayTimer

      public void setStateEventDelayTimer(float _StateEventDelayTimer)
    • getWidth

      public float getWidth()
      Returns:
      the width
    • setWidth

      public void setWidth(float _width)
    • isbAltCollide

      public boolean isbAltCollide()
      Returns:
      the bAltCollide
    • setbAltCollide

      public void setbAltCollide(boolean _bAltCollide)
    • isShootable

      public boolean isShootable()
      Returns:
      the shootable
    • setShootable

      public void setShootable(boolean _shootable)
    • getLastTargettedBy

      public IsoZombie getLastTargettedBy()
      Returns:
      the lastTargettedBy
    • setLastTargettedBy

      public void setLastTargettedBy(IsoZombie _lastTargettedBy)
    • isCollidable

      public boolean isCollidable()
      Returns:
      the Collidable
    • setCollidable

      public void setCollidable(boolean _Collidable)
    • getScriptnx

      public float getScriptnx()
      Returns:
      the scriptnx
    • setScriptnx

      public void setScriptnx(float _scriptnx)
    • getScriptny

      public float getScriptny()
      Returns:
      the scriptny
    • setScriptny

      public void setScriptny(float _scriptny)
    • getScriptModule

      public String getScriptModule()
      Returns:
      the ScriptModule
    • setScriptModule

      public void setScriptModule(String _ScriptModule)
    • getMovementLastFrame

      public Vector2 getMovementLastFrame()
      Returns:
      the movementLastFrame
    • setMovementLastFrame

      public void setMovementLastFrame(Vector2 _movementLastFrame)
    • getFeelersize

      public float getFeelersize()
      Returns:
      the feelersize
    • setFeelersize

      public void setFeelersize(float _feelersize)
    • 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()
    • isExistInTheWorld

      public boolean isExistInTheWorld()
      Overrides:
      isExistInTheWorld in class IsoObject
    • shouldIgnoreCollisionWithSquare

      public boolean shouldIgnoreCollisionWithSquare(IsoGridSquare var1)