Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
57632a83
Commit
57632a83
authored
Oct 06, 2018
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable checking sound timer on touch devices
parent
c999dca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
public/src/js/game.js
public/src/js/game.js
+11
-9
No files found.
public/src/js/game.js
View file @
57632a83
...
@@ -339,21 +339,23 @@ class Game{
...
@@ -339,21 +339,23 @@ class Game{
this
.
started
=
true
this
.
started
=
true
this
.
sndTime
=
this
.
startDate
-
snd
.
buffer
.
getTime
()
*
1000
this
.
sndTime
=
this
.
startDate
-
snd
.
buffer
.
getTime
()
*
1000
}
else
if
(
ms
<
0
||
ms
>=
0
&&
this
.
started
){
}
else
if
(
ms
<
0
||
ms
>=
0
&&
this
.
started
){
this
.
elapsedTime
=
this
.
getAccurateTime
(
ms
>=
0
)
var
currentDate
=
+
new
Date
if
(
!
this
.
controller
.
touchEnabled
){
var
sndTime
=
currentDate
-
snd
.
buffer
.
getTime
()
*
1000
var
lag
=
sndTime
-
this
.
sndTime
if
(
Math
.
abs
(
lag
)
>=
50
){
this
.
startDate
+=
lag
this
.
sndTime
=
sndTime
}
}
this
.
elapsedTime
=
currentDate
-
this
.
startDate
}
}
}
}
getAccurateTime
(){
getAccurateTime
(){
if
(
this
.
isPaused
()){
if
(
this
.
isPaused
()){
return
this
.
elapsedTime
return
this
.
elapsedTime
}
else
{
}
else
{
var
currentDate
=
+
new
Date
return
(
+
new
Date
)
-
this
.
startDate
var
sndTime
=
currentDate
-
snd
.
buffer
.
getTime
()
*
1000
var
lag
=
sndTime
-
this
.
sndTime
if
(
Math
.
abs
(
lag
)
>=
50
){
this
.
startDate
+=
lag
this
.
sndTime
=
sndTime
}
return
currentDate
-
this
.
startDate
}
}
}
}
getCircles
(){
getCircles
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment