Merge remote-tracking branch 'origin/master'

This commit is contained in:
Jonas1989 2014-12-07 14:00:22 +01:00
commit 148ea3d9b4
2 changed files with 16 additions and 1 deletions

View file

@ -21,7 +21,7 @@ gulp.task('server', function() {
}); });
gulp.task('compile', function() { gulp.task('compile', function() {
return gulp.src(['src/entities/*.coffee', 'src/tiles/*.coffee', 'src/tools.coffee', 'src/app.coffee', 'src/game.coffee', 'src/hud.coffee']) return gulp.src(['src/entities/*.coffee', 'src/items/*.coffee', , 'src/tiles/*.coffee', 'src/tools.coffee', 'src/app.coffee', 'src/game.coffee', 'src/hud.coffee'])
.pipe(sourcemaps.init()) .pipe(sourcemaps.init())
.pipe(coffee({bare: true})) .pipe(coffee({bare: true}))
.pipe(concat('app.js')) .pipe(concat('app.js'))

View file

@ -0,0 +1,15 @@
class AnimatedItem
constructor: (options) ->
{@maxFrames, @image}
@frame = 0
window.setInterval @changeAnimation, 500
sprite: ->
[@frame*8, 8, 8, 8]
changeAnimation: =>
if @frame == @maxFrames
@frame = 0
else
@frame += 1