uberpong/dev/lib/game/entities/ball.js

29 lines
434 B
JavaScript

ig.module(
'game.entities.ball'
)
.requires(
'impact.entity'
)
.defines(function(){
EntityBall = ig.Entity.extend({
size: {x:48, y:48},
collides: ig.Entity.COLLIDES.ACTIVE,
animSheet: new ig.AnimationSheet( 'media/ball.png', 48, 48 ),
bounciness: 1,
init: function( x, y, settings ) {
this.parent( x, y, settings );
this.addAnim( 'idle', 1, [0] );
this.vel.x = -400;
this.vel.y = 200;
}
});
});