Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PIXISpriteVelocity

A velocity settings for facility sprite movement

Hierarchy

  • PIXISpriteVelocity

Properties

A_knockbackHit

A_knockbackHit: function

Action: Sprite receive hit movement

sprite.velocity.A_knockbackHit(sprite, {
 value: 50, // quantity for movement value move
 time: 0.5, // time to execute value
 direction: 'right' // direction to sprite move
})
param

Actually object referal

param

Definitions for knockback effect

Type declaration

movement

movement: boolean

true allows movement sprite

setMovement

setMovement: function

Switch boolean value for velocity.movement

// ...
sprite.velocity.setMovement(sprite);
// ...

Type declaration

setVelocity

setVelocity: function

Set value in velocity.x and velocity.y

// ...
sprite.velocity.setVelocity(sprite, 5);
// ...

Type declaration

    • Parameters

      Returns void

x

x: number

velocity in x axis

y

y: number

velocity in y axis

Generated using TypeDoc