Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Cocos-GoldenMiner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
等吃饭
Cocos-GoldenMiner
Commits
c7f76e3e
Commit
c7f76e3e
authored
Apr 25, 2023
by
Friends233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加屏幕监听计时
parent
aa07dd0d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
GameScene.ts
assets/Script/GameScene.ts
+12
-0
index.js
build/web-mobile/assets/main/index.js
+1
-1
index.html
build/web-mobile/index.html
+3
-3
main.js
build/web-mobile/main.js
+2
-2
No files found.
assets/Script/GameScene.ts
View file @
c7f76e3e
...
@@ -81,6 +81,10 @@ export default class GameScene extends cc.Component {
...
@@ -81,6 +81,10 @@ export default class GameScene extends cc.Component {
/** 加速倍率 */
/** 加速倍率 */
speedMultiplier
=
1
speedMultiplier
=
1
/** 差值 */
difference
=
0
dateNow
=
0
protected
onLoad
():
void
{
protected
onLoad
():
void
{
// loadGameResources()
// loadGameResources()
...
@@ -102,6 +106,14 @@ export default class GameScene extends cc.Component {
...
@@ -102,6 +106,14 @@ export default class GameScene extends cc.Component {
gameBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playGame
,
this
)
gameBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playGame
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_ANI_END
,
this
.
onAnimCompleted
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_ANI_END
,
this
.
onAnimCompleted
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_COLLISION
,
this
.
onCollEnter
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_COLLISION
,
this
.
onCollEnter
,
this
)
cc
.
game
.
on
(
cc
.
game
.
EVENT_HIDE
,
()
=>
{
this
.
dateNow
=
Date
.
now
()
})
cc
.
game
.
on
(
cc
.
game
.
EVENT_SHOW
,
()
=>
{
const
difference
=
Date
.
now
()
-
this
.
dateNow
this
.
countDown
=
Math
.
max
(
0
,
this
.
countDown
-
Math
.
ceil
(
difference
/
1000
))
this
.
dateNow
=
0
})
exportEvent
.
on
(
CUSTOM_EVENT
.
NEXT_LEVEL
,
this
.
nextLevel
,
this
)
exportEvent
.
on
(
CUSTOM_EVENT
.
NEXT_LEVEL
,
this
.
nextLevel
,
this
)
exportEvent
.
on
(
CUSTOM_EVENT
.
GAME_START
,
this
.
startGame
,
this
)
exportEvent
.
on
(
CUSTOM_EVENT
.
GAME_START
,
this
.
startGame
,
this
)
...
...
build/web-mobile/assets/main/index.js
View file @
c7f76e3e
This diff is collapsed.
Click to expand it.
build/web-mobile/index.html
View file @
c7f76e3e
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<!-- <script src="//yun.duiba.com.cn/db_games/libs0924/svgaParser.minWeb.js" crossorigin="anonymous"></script>-->
<!-- <script src="//yun.duiba.com.cn/db_games/libs0924/svgaParser.minWeb.js" crossorigin="anonymous"></script>-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
1898392442
/style-mobile.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
2304200376
/style-mobile.css"
/>
<style>
<style>
...
@@ -90,9 +90,9 @@
...
@@ -90,9 +90,9 @@
</div>
</div>
</div>
</div>
<script
src=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
1898392442
/src/settings.js"
charset=
"utf-8"
></script>
<script
src=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
2304200376
/src/settings.js"
charset=
"utf-8"
></script>
<script
src=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
1898392442
/main.js"
charset=
"utf-8"
></script>
<script
src=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
2304200376
/main.js"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
(
function
()
{
(
function
()
{
...
...
build/web-mobile/main.js
View file @
c7f76e3e
window
.
__remoteUrl__
=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
1898392442
/"
;
window
.
__remoteUrl__
=
"https://yun.duiba.com.cn/db_games/ccc_game/template/168
2304200376
/"
;
window
.
__remoteAssets__
=
window
.
__remoteUrl__
+
"assets/"
;
window
.
__remoteAssets__
=
window
.
__remoteUrl__
+
"assets/"
;
window
.
__version__
=
168
1898392442
;
window
.
__version__
=
168
2304200376
;
window
.
__ENV__
=
"prod"
;
window
.
__ENV__
=
"prod"
;
window
.
boot
=
function
()
{
window
.
boot
=
function
()
{
...
...
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