ig.

Projectile

new Projectile()

Base projectile entity. IMPORTANT: this is an abstract entity that should be extended.

Author:
  • Collin Hover - collinhover.com
Source:

damage :Number

Damage done.

Default Value:
  • 1
Source:

damageAsPct :Boolean

Damage done is a percent of target's health.

Default Value:
  • false
Source:

damageUnblockable :Boolean

Damage done cannot be blocked.

Default Value:
  • false
Source:

fadeBeforeDeathDuration

Default Value:
  • 0
Source:

gravityFactor

Projectiles should not be affected by gravity so much.

Default Value:
  • 0.1
Source:

lifeDuration

Default Value:
  • 4
Source:

randomDoubleVel

Default Value:
  • false
Source:

randomFlip

Default Value:
  • false
Source:

randomVel

Default Value:
  • false
Source:

check()

Checks projectile to see if has hit an entity of type ig.EntityExtended.TYPE.DAMAGEABLE.

Source:

initProperties()

Initializes projectile types.
- adds ig.EntityExtended.TYPE.DAMAGEABLE to ig.EntityExtended#checkAgainst

Source: