paddle
This commit is contained in:
parent
b3f3b9e2dd
commit
9d7a5f0163
14
config.js
14
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);
|
||||
|
|
Loading…
Reference in a new issue