You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
314 B
CoffeeScript
12 lines
314 B
CoffeeScript
10 years ago
|
class Sprite
|
||
|
constructor: (@engine, @name, @image) ->
|
||
|
pass
|
||
|
|
||
|
draw: (x, y, options = {}, surface = "") =>
|
||
|
surface = @engine.getSurface(surface)
|
||
|
# TODO: Options.
|
||
|
surface.globalAlpha = options.alpha ? 1
|
||
|
surface.drawImage(@image, x, y)
|
||
|
|
||
|
getSize: =>
|
||
|
return {width: @image.width, height: @image.height}
|