Sprite

php\gdx\graphics\Sprite

Class Sprite

Methods


__construct($texture, $width, $height, $x, $y)
Параметры:
  • $texturephp\gdx\graphics\Texture - (optional)
  • $widthint - (optional)
  • $heightint - (optional)
  • $xint - (optional)
  • $yint - (optional)
setBounds($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
setSize($width, $height)
Параметры:
  • $widthint
  • $heightint
setPosition($x, $y)
Параметры:
  • $xint
  • $yint
setX($x)
Параметры:
  • $xint
getX()
Результат:int
setY($y)
Параметры:
  • $yint
getY()
Результат:int
translateX($xAmount)
Параметры:
  • $xAmountdouble
translateY($yAmount)
Параметры:
  • $yAmountdouble
translate($xAmount, $yAmount)
Параметры:
  • $xAmountdouble
  • $yAmountdouble
setAlpha($alpha)
Параметры:
  • $alphadouble
setOrigin($originX, $originY)
Параметры:
  • $originXint
  • $originYint
setOriginCenter()
setRotation($degrees)
Параметры:
  • $degreesdouble
getRotation()
Результат:double
rotate($degrees)
Параметры:
  • $degreesdouble
rotate90($clockwise)
Параметры:
  • $clockwisebool
setScale($scaleXY, $scaleY)
Параметры:
  • $scaleXYdouble
  • $scaleYdouble - (optional)
scale($amount)
Параметры:
  • $amountdouble
flip($x, $y)
Параметры:
  • $xint
  • $yint
scroll($xAmount, $yAmount)
Параметры:
  • $xAmountdouble
  • $yAmountdouble
draw($batch, $alphaModulation)
Параметры: