diff --git a/config.js b/config.js index 03a1309..37537f6 100644 --- a/config.js +++ b/config.js @@ -52,11 +52,21 @@ var paddle = gameobject.clone("paddle", { collider: polygon2d.clone(), img: sprite.clone(), - speed: 10, + speed: 1000, + + input_larrow_down() { this.input_a_down(); }, + + input_a_down() { + this.pos = this.pos.add([-1,0].scale(this.speed*Yugine.dt)); + }, + + input_d_down() { + this.pos = this.pos.add([1,0].scale(this.speed*Yugine.dt)); + }, gamepad_ljoy_axis(v) { v[1] = 0; - this.pos = this.pos.add(v.scale(this.speed)); + this.pos = this.pos.add(v.scale(this.speed*Yugine.dt)); }, setup() { Player.players[0].control(this);