Set sprite dimensions as attributes, and allow for easing abortion

feature/coffeescript
Sven Slootweg 10 years ago
parent 3a8ed9bd36
commit c4c22ee529

File diff suppressed because one or more lines are too long

@ -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',

@ -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)

Loading…
Cancel
Save