Created
April 2, 2013 23:34
-
-
Save jdoig/5297168 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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