Sprite¶
-
php\gdx\graphics\Sprite
Class Sprite
Methods
__construct
($texture, $width, $height, $x, $y)¶
Параметры:
- $texture – php\gdx\graphics\Texture - (optional)
- $width –
int
- (optional)- $height –
int
- (optional)- $x –
int
- (optional)- $y –
int
- (optional)
setBounds
($x, $y, $width, $height)¶
Параметры:
- $x –
int
- $y –
int
- $width –
int
- $height –
int
setSize
($width, $height)¶
Параметры:
- $width –
int
- $height –
int
setPosition
($x, $y)¶
Параметры:
- $x –
int
- $y –
int
setX
($x)¶
Параметры:
- $x –
int
getX
()¶
Результат: int
setY
($y)¶
Параметры:
- $y –
int
getY
()¶
Результат: int
translateX
($xAmount)¶
Параметры:
- $xAmount –
double
translateY
($yAmount)¶
Параметры:
- $yAmount –
double
translate
($xAmount, $yAmount)¶
Параметры:
- $xAmount –
double
- $yAmount –
double
setAlpha
($alpha)¶
Параметры:
- $alpha –
double
setOrigin
($originX, $originY)¶
Параметры:
- $originX –
int
- $originY –
int
setOriginCenter
()¶
setRotation
($degrees)¶
Параметры:
- $degrees –
double
getRotation
()¶
Результат: double
rotate
($degrees)¶
Параметры:
- $degrees –
double
rotate90
($clockwise)¶
Параметры:
- $clockwise –
bool
setScale
($scaleXY, $scaleY)¶
Параметры:
- $scaleXY –
double
- $scaleY –
double
- (optional)
scale
($amount)¶
Параметры:
- $amount –
double
flip
($x, $y)¶
Параметры:
- $x –
int
- $y –
int
scroll
($xAmount, $yAmount)¶
Параметры:
- $xAmount –
double
- $yAmount –
double
draw
($batch, $alphaModulation)¶
Параметры:
- $batch – php\gdx\graphics\SpriteBatch
- $alphaModulation –
double
- (optional)