Home

Sprite

Bitmap sprite

Implements: Shape

Operations

AddX

Increments the current x-position

method : public : AddX(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntincrement to the current x-position

AddY

Increments the current y-position

method : public : AddY(y:Int) ~ Nil
Parameters
NameTypeDescription
yIntincrement to the current y-position

Free

Destroys and frees sprite resources

method : public : Free() ~ Nil

GetBottom

Gets bottom position

method : public : GetBottom() ~ Int
Return
TypeDescription
Intbottom position

GetCenterX

Gets the center x-position

method : public : GetCenterX() ~ Int
Return
TypeDescription
Intcenter x-position

GetCenterY

Gets the center y-position

method : public : GetCenterY() ~ Int
Return
TypeDescription
Intcenter y-position

GetHeight

Gets sprite height

method : public : GetHeight() ~ Int
Return
TypeDescription
Intsprite height

GetLeft

Gets left position

method : public : GetLeft() ~ Int
Return
TypeDescription
Intleft position

GetPosition

Gets sprite position

method : public : GetPosition() ~ Position
Return
TypeDescription
Positionsprite position

GetRight

Gets right position

method : public : GetRight() ~ Int
Return
TypeDescription
Intright position

GetScale

Gets scaling percentage

method : public : GetScale() ~ Float
Return
TypeDescription
Floatscaling percentage

GetTop

Gets top position

method : public : GetTop() ~ Int
Return
TypeDescription
Inttop position

GetWidth

Gets sprite width

method : public : GetWidth() ~ Int
Return
TypeDescription
Intsprite width

Set

Sets upper left position

method : public : Set(x:Int, y:Int) ~ Nil
Parameters
NameTypeDescription
xIntx-position
yInty-position

Sets position

method : public : Set(v2:Vector2) ~ Nil
Parameters
NameTypeDescription
v2Vector2vector position

SetAlpha

Sets alpha

method : public : SetAlpha(alpha:Int) ~ Nil
Parameters
NameTypeDescription
alphaIntsetting

SetBlendMode

Sets blend mode

method : public : SetBlendMode(blending:BlendMode) ~ Nil
Parameters
NameTypeDescription
blendingBlendModeblend mode

SetBottom

Sets bottom position

method : public : SetBottom(y2:Int) ~ Nil
Parameters
NameTypeDescription
y2Intbottom position

SetCenter

Sets cener position

method : public : SetCenter(x:Int, y:Int) ~ Nil
Parameters
NameTypeDescription
xIntx-position
yInty-position

SetCenterX

Sets center x-position

method : public : SetCenterX(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntcenter x-position

SetCenterY

Sets center y-position

method : public : SetCenterY(y:Int) ~ Nil
Parameters
NameTypeDescription
yIntcenter y-position

SetColor

Sets the color

method : public : SetColor(red:Int, green:Int, blue:Int) ~ Nil
Parameters
NameTypeDescription
redIntred
greenIntgreen
blueIntblue

SetLeft

Sets left position

method : public : SetLeft(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntleft position

SetPostion

Sets the current x-position

method : public : SetPostion(position:Position) ~ Nil
Parameters
NameTypeDescription
positionPositionnew position

SetRight

Sets right position

method : public : SetRight(x2:Int) ~ Nil
Parameters
NameTypeDescription
x2Intright position

SetScale

Sets scaling percentage

method : public : SetScale(scale:Float) ~ Nil
Parameters
NameTypeDescription
scaleFloatscaling percentage

SetTop

Sets top position

method : public : SetTop(y:Int) ~ Nil
Parameters
NameTypeDescription
yInttop position