发表更新几秒读完 (大约68个字)0次访问
游戏跳跃
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| jump() { this.speedY = this.jumpSpeed; }, update(dt) { if (this.state != STATE.NONE || this.state != STATE.DEAD) { this.speedY -= this.g; this.node.y += this.speedY; if (this.node.y < -440) { this.node.y = -440; } if (this.node.y > 420) { this.node.y = 420; } } }
|