ig.

EntityDirection

new EntityDirection()

Entity particle that points in a direction. IMPORTANT: this entity has a defined size and animation sheet!

Author:
  • Collin Hover - collinhover.com
Source:

alpha

Default Value:
  • 0.75
Source:

animSettings :Object

Direction default animations.

Properties:
Name Type Description
none Object 0
left Object 1
right Object 2
up Object 3
down Object 4
upleft Object 5
upright Object 6
downleft Object 7
downright Object 8
Source:

animSheet

Default Value:
  • directions_32.png
Source:

canFlipX

Direction never flips.

Source:

canFlipY

Direction never flips.

Source:

direction :Vector2

Direction vector.

Source:

directionName :String

Name of direction.

Source:

fadeAfterSpawnDuration

Default Value:
  • 0.25
Source:

fadeBeforeDeathDuration

Default Value:
  • 1
Source:

lifeDuration

Default Value:
  • 1.5
Source:

performance

Direction arrow should be stationary.

Default Value:
  • static
Source:

randomFlip

Default Value:
  • false
Source:

size

Default Value:
  • 32 x 32
Source:

resetExtras()

Resets direction visuals.
- sets duration of all animations to match ig.EntityDirection#lifeDuration
- sets initial direction from ig.EntityDirection#directionName or ig.EntityDirection#direction

Source:

setDirection(direction)

Sets the direction from a vector object.

Parameters:
Name Type Argument Default Description
direction Vector2 | Object <optional>
none vector direction
Source:

setDirectionName(directionName)

Sets the direction from a name.

Parameters:
Name Type Argument Default Description
directionName String <optional>
none name of direction
Source: