Skip to content

Instantly share code, notes, and snippets.

@jamesflorentino
Created January 24, 2012 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesflorentino/1670395 to your computer and use it in GitHub Desktop.
Save jamesflorentino/1670395 to your computer and use it in GitHub Desktop.
class Wol.Views.Marine extends Wol.Views.UnitView
init: ->
image = @model.getAsset 'marine'
frameData = FrameData.marine
frameData.images = [image]
spriteSheet = new SpriteSheet frameData
@animation = new BitmapAnimation spriteSheet
@el.addChild @animation
super()
return
onSpawn: ->
super()
@animation.gotoAndStop 0
return
onMove: ->
super()
@animation.gotoAndPlay 'onMoveStart'
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment