Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PowerUpResource

Hierarchy

Index

Constructors

constructor

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
  • Parameters

    • parameters: any

    Returns void

getFactionId

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

    Returns any

getHasExtendedCullRadius

  • getHasExtendedCullRadius(): boolean

getMetaclass

  • getMetaclass(): any
  • Returns the meta class of the entity.

    Returns any

getPositionTileSpace

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

    Returns Vector

getRenderingSprite

  • getRenderingSprite(): any
  • Returns any

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
  • Returns any

Static verify

  • verify(data: any): string