Skip to content

Instantly share code, notes, and snippets.

@jdoig
Created April 2, 2013 23:34
Show Gist options
  • Save jdoig/5297168 to your computer and use it in GitHub Desktop.
Save jdoig/5297168 to your computer and use it in GitHub Desktop.
ig.module
'game.entities.Player'
.requires
'impact.entity'
.defines =>
class @.EntityPlayer extends ig.Entity
animSheet: new ig.AnimationSheet 'media/player.png', 16, 16
size:
x: 8
y: 14
offset:
x: 4
y: 2
flip: no
maxVel:
x: 100
y: 150
friction:
x: 600
y: 0
accelGround: 400
accelAir: 200
jump: 200
init: (x, y, settings) ->
super x, y, settings
@addAnim 'idle', 1, [0]
@addAnim 'run', .07, [0,1,2,3,4,5]
@addAnim 'jump', 1, [9]
@addAnim 'fall', .4, [6,7]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment