2012-06-22 18:20:41 +02:00
|
|
|
ig.module(
|
|
|
|
'game.entities.paddle'
|
|
|
|
)
|
|
|
|
.requires(
|
|
|
|
'impact.entity'
|
|
|
|
)
|
|
|
|
.defines(function(){
|
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
EntityPaddle = ig.Entity.extend({
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
name: 'paddle',
|
2012-07-06 17:09:07 +02:00
|
|
|
scores: 0, // TODO: whats this?
|
2012-06-24 10:41:41 +02:00
|
|
|
|
2012-10-20 22:43:14 +02:00
|
|
|
size: {x: 30, y: 120},
|
2012-06-24 10:50:26 +02:00
|
|
|
collides: ig.Entity.COLLIDES.FIXED,
|
|
|
|
type: ig.Entity.TYPE.A,
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-10-20 22:43:14 +02:00
|
|
|
animSheet: new ig.AnimationSheet('media/paddle.png', 30, 120),
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
maxVel: {x: 0, y: 400},
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
init: function( x, y, settings ) {
|
|
|
|
this.parent( x, y, settings );
|
|
|
|
this.addAnim( 'idle', 1, [0] );
|
|
|
|
}
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
});
|
2012-06-22 18:20:41 +02:00
|
|
|
|
2012-06-24 10:50:26 +02:00
|
|
|
});
|