Ramu 0.7b doc
class
Sprite : Drawable
Description
Displays an image.
Constructor Parameters
Image Object
img: The image.int
x: Position in x.int
y: Position in y.int
width: Width.int
height: Height.bool
canDraw: Whether it will be drawn or not. (optional, default is true)
You can test this snippet of code here.
let img = Ramu.Utils.getImage("https://i.imgur.com/E0Z8YMr.png");
let s = new Sprite(img, 10, 10, 100, 100, true);
Properties
Inherited Members
- canDestroy
- canDraw
- canUpdate
- destroy
- draw
- drawOutOfCanvas
- drawPriority
- flipHorizontally
- flipVertically
- height
- opacity
- setActive
- start
- tag
- toRect
- update
- updatePriority
- width
- x
- y