API Docs for: 1.13.1
Show:

game.Sprite Class

Constructor

game.Sprite

(
  • texture
  • [x]
  • [y]
  • [properties]
)

Parameters:

  • texture String
  • [x] Number optional
  • [y] Number optional
  • [properties] Object optional

Item Index

Methods

addTo

(
  • container
)

Add to container.

Parameters:

center

(
  • offsetX
  • offsetY
)
chainable

Position sprite to system center.

Parameters:

  • offsetX Number

    Offset x coordinate to system center

  • offsetY Number

    Offset y coordinate to system center

crop

(
  • x
  • y
  • width
  • height
)
chainable

Crop sprite.

Parameters:

  • x Number

    The x coordinate of left-top point to crop

  • y Number

    The y coordinate of left-top point to crop

  • width Number

    The width of sprite to crop to

  • height Number

    The height of sprite to crop to

remove

()

Remove from it's parent.