Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AxeZombie

Hierarchy

Index

Constructors

constructor

  • new AxeZombie(meta: any, root: any, faction: any, payload: any): AxeZombie
  • Parameters

    • meta: any
    • root: any
    • faction: any
    • payload: any

    Returns AxeZombie

Methods

addComponent

  • addComponent(componentInstance: any, force?: boolean): void
  • Adds a new component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.addDynamicComponent

    Parameters

    • componentInstance: any
    • Default value force: boolean = false

      Used by the entity manager. Internal parameter, do not change

    Returns void

deserialize

  • deserialize(data: any): any

distanceToEntity

  • distanceToEntity(other: any): number
  • Returns the world distance to a given entity

    Parameters

    • other: any

    Returns number

draw

  • draw(parameters: any): void
  • Draws the entity, to override use @see Entity.drawImpl

    Parameters

    • parameters: any

    Returns void

drawImpl

  • drawImpl(parameters: any): void

getFactionId

  • getFactionId(): any
  • Returns the string-id of the entities faction

    Returns any

getHasExtendedCullRadius

  • getHasExtendedCullRadius(): boolean
  • override, if true this means this entity draws something outside of his tile, so he will be drawn even if the tile is outside of the view (we check if any of the surrounding tiles is in view additionally)

    Returns boolean

getMetaclass

  • getMetaclass(): any

getPositionTileSpace

  • getPositionTileSpace(): Vector
  • Returns the position in tile space, but not snapped, so it could be 5.5 for example

    Returns Vector

getRenderingScale

  • getRenderingScale(): number
  • Can be overriden by subclasses to render the zombie bigger

    Returns number

getTile

  • Returns the tile space position

    Returns Vector

getWorldPosition

internalDestroyCallback

  • internalDestroyCallback(): void

isAlive

  • isAlive(): boolean
  • Returns whether the entity is still alive

    Returns boolean

isStunned

  • isStunned(): any
  • Returns if the entity is stunned

    Returns any

isWithinTileRadius

  • isWithinTileRadius(posWorld: any, radiusTiles: any): boolean
  • Checks whether the given world space position is within the given tile radius to the entities center

    Parameters

    • posWorld: any

      The position to check

    • radiusTiles: any

      The maximum distance in tile space

    Returns boolean

    true if the position is within the given range

isWithinTransportRange

  • isWithinTransportRange(otherEntity: any): boolean
  • Checks if the other entity is within the transport range

    Parameters

    • otherEntity: any

    Returns boolean

    true if the entity is within range

removeComponent

  • removeComponent(componentClass: any): void
  • Removes a given component, only possible until the entity is registered on the entity manager, after that use @see EntityManager.removeDynamicComponent

    Parameters

    • componentClass: any

    Returns void

serialize

  • serialize(): object

squareDistanceToEntity

  • squareDistanceToEntity(other: any): number
  • Returns the squared world distance to a given entity

    Parameters

    • other: any

    Returns number

squareTileDistanceToEntity

  • squareTileDistanceToEntity(other: any): number
  • Returns the squared tile space distance to a given entity

    Parameters

    • other: any

    Returns number

Static getCachedSchema

  • getCachedSchema(): any

Static getId

  • getId(): string
  • Returns string

Static getSchema

  • getSchema(): any

Static verify

  • verify(data: any): string