Browse Source

Set sprite dimensions as attributes, and allow for easing abortion

feature/coffeescript
Sven Slootweg 8 years ago
parent
commit
c4c22ee529
  1. 17570
      compiled/radium.js
  2. 3
      radium/engine.ease.coffee
  3. 4
      radium/sprite.coffee

17570
compiled/radium.js
File diff suppressed because it is too large
View File

3
radium/engine.ease.coffee

@ -113,6 +113,9 @@ class Ease
@finished = false
@next = @next.next
abort: =>
@finished = true
updateValue: (current_frame) =>
# We recalculate here, to deal with 'stacked' easings. If we don't do this, letting multiple
# easings operate on each other will result in the final value being different from 'end',

4
radium/sprite.coffee

@ -1,6 +1,6 @@
class Sprite
constructor: (@engine, @name, @image) ->
pass
{width: @width, height: @height} = @getSize()
draw: (x, y, options = {}, surface = "") =>
surface = @engine.getSurface(surface)
@ -9,4 +9,4 @@ class Sprite
surface.drawImage(@image, x, y)
getSize: =>
return {width: @image.width, height: @image.height}
return {width: @image.width, height: @image.height}
Loading…
Cancel
Save