Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Projectile

A projectile entity.

Hierarchy

  • Projectile

Index

Constructors

constructor

  • new Projectile(containerType: number, containerProps: any, bulletType: number, ownerObjectId: number, bulletId: number, startAngle: number, startTime: number, startPosition: Point): Projectile
  • Parameters

    • containerType: number
    • containerProps: any
    • bulletType: number
    • ownerObjectId: number
    • bulletId: number
    • startAngle: number
    • startTime: number
    • startPosition: Point

    Returns Projectile

Properties

bulletId

bulletId: number

The identifier for this particular projectile. Similar to the object id of entities.

bulletType

bulletType: number

The local identifier of the containerTypes projectile list.

see

ProjectileInfo.id

containerProperties

containerProperties: GameObject

The properties of the container used to produce this projectile.

containerType

containerType: number

The id of the entity that produced this projectile.

currentPosition

currentPosition: Point

The current position of this projectile.

damage

damage: number

The damage which will be applied by this projectile if it hits an entity.

damageEnemies

damageEnemies: boolean

Whether or not this projectile damages enemies.

damagePlayers

damagePlayers: boolean

Whether or not this projectile damages players.

multiHit

multiHit: Set<number>

ownerObjectId

ownerObjectId: number

The object id of the entity which produced this projectile.

projectileProperties

projectileProperties: ProjectileInfo

The properties of this projectile.

startAngle

startAngle: number

The angle at which this projectile was fired.

startPosition

startPosition: Point

The position which this projectile was fired at.

startTime

startTime: number

The client time at the point when this projectile was fired.

Methods

Private getPositionAt

  • getPositionAt(time: number): Point

setDamage

  • setDamage(damage: number): void

update

  • update(currentTime: number): boolean

Generated using TypeDoc