Class BB_Sprite
Defined in: Sprite.js.
Constructor Attributes | Constructor Name and Description |
---|---|
PNG Sprite generator
|
Method Attributes | Method Name and Description |
---|---|
paint(ctx, x, y, w, h, sx, sy)
Draw sprites
|
|
render(ctx, scale)
Render the whole sprite
|
|
renderBall(ctx, x, y, angle, rubber, scale)
Render the red button
|
|
renderButton(ctx, x, y, w, h, r, text, status)
Render UI buttons
|
|
renderCircle(ctx, x, y, r, fill, stroke, width, shadow)
Render circles
|
|
renderCoin(ctx, x, y, angle, scale)
Render the golden buttons
|
Method Detail
paint(ctx, x, y, w, h, sx, sy)
Draw sprites
- Parameters:
- ctx
- {Number} x
- {Number} y
- {Number} w
- {Number} h
- {Number} sx
- {Number} sy
{BB_Sprite}
render(ctx, scale)
Render the whole sprite
- Parameters:
- ctx
- {Number} scale
- Returns:
- {BB_Sprite}
renderBall(ctx, x, y, angle, rubber, scale)
Render the red button
- Parameters:
- ctx
- {Number} x
- {Number} y
- {Number} angle
- {Number} rubber
- {Number} scale
renderButton(ctx, x, y, w, h, r, text, status)
Render UI buttons
- Parameters:
- ctx
- {Number} x
- {Number} y
- {Number} w
- {Number} h
- {Number} r
- {String} text
- {Number} status
renderCircle(ctx, x, y, r, fill, stroke, width, shadow)
Render circles
- Parameters:
- ctx
- {Number} x
- {Number} y
- {Number} r
- {Number} fill
- {Number} stroke
- {Number} width
- {Number} shadow
renderCoin(ctx, x, y, angle, scale)
Render the golden buttons
- Parameters:
- ctx
- {Number} x
- {Number} y
- {Number} angle
- {Number} scale