2018-10-02 ジャンプ javascript ジャンプの処理 update: function() { if(this.jFlag){ //vyは上昇時はマイナス、下降時はプラス this.vy += 1 this.y += this.vy if(this.y == GROUND){ this.jFlag = false } } }, jump(){ this.jFlag = true this.vy = -20 }, マップスクロール let offset = player.pos - SCREEN_SIZE/2 全体からoffsetをひく