uberpong/dev/lib/game/entities/paddle.js
Aaron Mueller a40f9d600a Add sound, see #2
Convert the sounds to ogg (just ogg and mo3 is supported by Inpact)
and play it on the events.
2012-06-27 22:53:55 +02:00

30 lines
449 B
JavaScript

ig.module(
'game.entities.paddle'
)
.requires(
'impact.entity'
)
.defines(function(){
EntityPaddle = ig.Entity.extend({
name: 'paddle',
scores: 0,
size: {x: 30, y: 96},
collides: ig.Entity.COLLIDES.FIXED,
type: ig.Entity.TYPE.A,
animSheet: new ig.AnimationSheet( 'media/paddle.png', 30, 96 ),
maxVel: {x: 0, y: 400},
init: function( x, y, settings ) {
this.parent( x, y, settings );
this.addAnim( 'idle', 1, [0] );
}
});
});