This commit is contained in:
John Alanbrook 2023-05-03 18:50:54 +00:00
parent b3f3b9e2dd
commit 9d7a5f0163

View file

@ -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);