|
@@ -50,8 +50,6 @@ export default class App {
|
|
this.w = 0;
|
|
this.w = 0;
|
|
this.draw = false;
|
|
this.draw = false;
|
|
this.restart();
|
|
this.restart();
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
restart() {
|
|
restart() {
|
|
@@ -67,13 +65,10 @@ export default class App {
|
|
'touchstart',
|
|
'touchstart',
|
|
this.touchHandler
|
|
this.touchHandler
|
|
)
|
|
)
|
|
-
|
|
|
|
-
|
|
|
|
this.aniId = window.requestAnimationFrame(
|
|
this.aniId = window.requestAnimationFrame(
|
|
this.bindLoop,
|
|
this.bindLoop,
|
|
canvas
|
|
canvas
|
|
)
|
|
)
|
|
-
|
|
|
|
}
|
|
}
|
|
step1() {
|
|
step1() {
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
|
@@ -95,7 +90,6 @@ export default class App {
|
|
y <= area.endY) {
|
|
y <= area.endY) {
|
|
this.secenceChange()
|
|
this.secenceChange()
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
secenceChange() {
|
|
secenceChange() {
|
|
canvas.removeEventListener(
|
|
canvas.removeEventListener(
|
|
@@ -109,15 +103,12 @@ export default class App {
|
|
this.bgupdate()
|
|
this.bgupdate()
|
|
this.aniId = window.requestAnimationFrame(this.up, canvas)
|
|
this.aniId = window.requestAnimationFrame(this.up, canvas)
|
|
this.music.secen2()
|
|
this.music.secen2()
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
initEvent() {
|
|
initEvent() {
|
|
canvas.addEventListener('touchstart', this.touchHandlerStart.bind(this))
|
|
canvas.addEventListener('touchstart', this.touchHandlerStart.bind(this))
|
|
canvas.addEventListener('touchmove', this.touchHanderMove.bind(this))
|
|
canvas.addEventListener('touchmove', this.touchHanderMove.bind(this))
|
|
canvas.addEventListener('touchend', this.touchEnd.bind(this))
|
|
canvas.addEventListener('touchend', this.touchEnd.bind(this))
|
|
-
|
|
|
|
}
|
|
}
|
|
touchHandlerStart(e) {
|
|
touchHandlerStart(e) {
|
|
if (this.fill) {
|
|
if (this.fill) {
|
|
@@ -146,8 +137,6 @@ export default class App {
|
|
this.hover();
|
|
this.hover();
|
|
this.date1 = new Date();
|
|
this.date1 = new Date();
|
|
}, 0);
|
|
}, 0);
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|