Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tb_project
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
钱根
tb_project
Commits
87765894
Commit
87765894
authored
Oct 05, 2021
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏页面修改 +提交分数逻辑防止重复提交
parent
540aa936
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
15 deletions
+19
-15
index.html
index.html
+3
-1
upload.js
scripts/upload.js
+2
-2
uploadSingleJs.js
scripts/uploadSingleJs.js
+2
-2
ResJson.ts
src/ResJson.ts
+1
-1
CountDownComp.ts
src/components/CountDownComp.ts
+1
-0
GameOverScene.ts
src/scenes/GameOverScene/GameOverScene.ts
+1
-1
GameScene.ts
src/scenes/GameScene/GameScene.ts
+4
-3
MotionInit.ts
src/scenes/GameScene/MotionInit.ts
+5
-5
No files found.
index.html
View file @
87765894
...
@@ -48,7 +48,9 @@
...
@@ -48,7 +48,9 @@
<body>
<body>
<script>
<script>
const
app
=
{};
const
app
=
{
isLarge
:
false
};
function
getApp
()
{
function
getApp
()
{
return
app
;
return
app
;
...
...
scripts/upload.js
View file @
87765894
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var
_this
=
this
;
var
_this
=
this
;
this
.
client
=
new
OSS
({
this
.
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI
4Fw25WcfcGv7FvcHoiHK
'
,
accessKeyId
:
'LTAI
5tLEo6SbjfmNPmH7Mz3o
'
,
accessKeySecret
:
'
NZk1NtT9J5HFaAolNbtQdzTzLLvLYm
'
,
accessKeySecret
:
'
8yZ6nVMg56DEupEEMRl6rz1DcpG2R7
'
,
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
});
});
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
...
...
scripts/uploadSingleJs.js
View file @
87765894
...
@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
...
@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
var
client
=
new
OSS
({
var
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI
4Fw25WcfcGv7FvcHoiHK
'
,
accessKeyId
:
'LTAI
5tLEo6SbjfmNPmH7Mz3o
'
,
accessKeySecret
:
'
NZk1NtT9J5HFaAolNbtQdzTzLLvLYm
'
,
accessKeySecret
:
'
8yZ6nVMg56DEupEEMRl6rz1DcpG2R7
'
,
bucket
:
'duiba'
bucket
:
'duiba'
})
})
var
originFile
;
var
originFile
;
...
...
src/ResJson.ts
View file @
87765894
...
@@ -3826,5 +3826,5 @@ export const ResJson = {
...
@@ -3826,5 +3826,5 @@ export const ResJson = {
}
}
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1632
799529
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1632
831758
/resource/"
}
}
\ No newline at end of file
src/components/CountDownComp.ts
View file @
87765894
...
@@ -66,6 +66,7 @@ export default class CountDownComp extends Module {
...
@@ -66,6 +66,7 @@ export default class CountDownComp extends Module {
countDown
(
time
:
TimeObj
,
onChange
:
Function
)
{
countDown
(
time
:
TimeObj
,
onChange
:
Function
)
{
var
tobj
=
this
.
tobj
=
time
var
tobj
=
this
.
tobj
=
time
this
.
tobj
&&
FYGE
.
Tween
.
removeTweens
(
this
.
tobj
)
FYGE
.
Tween
.
get
(
this
.
tobj
,
{
FYGE
.
Tween
.
get
(
this
.
tobj
,
{
onChange
:
()
=>
{
onChange
:
()
=>
{
onChange
(
tobj
.
t
)
onChange
(
tobj
.
t
)
...
...
src/scenes/GameOverScene/GameOverScene.ts
View file @
87765894
...
@@ -23,7 +23,7 @@ export class GameOverScene extends Scene {
...
@@ -23,7 +23,7 @@ export class GameOverScene extends Scene {
if
(
getApp
().
isLarge
)
{
if
(
getApp
().
isLarge
)
{
icon
.
position
.
set
(
41
,
layers
.
stageOffsetY
-
90
+
50
+
layers
.
stageOffsetY
)
icon
.
position
.
set
(
41
,
layers
.
stageOffsetY
-
90
+
50
+
layers
.
stageOffsetY
)
}
else
{
}
else
{
icon
.
position
.
set
(
41
,
layers
.
stageOffsetY
-
90
+
0
+
layers
.
stageOffsetY
)
icon
.
position
.
set
(
41
,
layers
.
stageOffsetY
-
90
+
5
+
layers
.
stageOffsetY
)
}
}
this
.
y
-=
layers
.
stageOffsetY
-
90
this
.
y
-=
layers
.
stageOffsetY
-
90
...
...
src/scenes/GameScene/GameScene.ts
View file @
87765894
...
@@ -15,6 +15,7 @@ import { GameOverScene } from '../GameOverScene/GameOverScene';
...
@@ -15,6 +15,7 @@ import { GameOverScene } from '../GameOverScene/GameOverScene';
import
{
GameOverPanel
}
from
'../../panels/GameOverPanel'
;
import
{
GameOverPanel
}
from
'../../panels/GameOverPanel'
;
import
MusicBtn
from
'../../common/MusicBtn'
;
import
MusicBtn
from
'../../common/MusicBtn'
;
import
{
yoga_fail
}
from
'../../lotties/yoga_fail'
;
import
{
yoga_fail
}
from
'../../lotties/yoga_fail'
;
import
{
onceFnc
}
from
'../../utils/utils'
;
const
Container
=
FYGE
.
Container
const
Container
=
FYGE
.
Container
const
TEXT_ALIGN
=
FYGE
.
TEXT_ALIGN
const
TEXT_ALIGN
=
FYGE
.
TEXT_ALIGN
...
@@ -171,7 +172,7 @@ export class GameScene extends MotionInitScene {
...
@@ -171,7 +172,7 @@ export class GameScene extends MotionInitScene {
var
cdp
=
this
.
cdp
=
this
.
addChild
(
new
CountDownComp
(
GameCfg
.
getInitTime
()))
var
cdp
=
this
.
cdp
=
this
.
addChild
(
new
CountDownComp
(
GameCfg
.
getInitTime
()))
this
.
setChildIndex
(
this
.
cdp
,
2
)
this
.
setChildIndex
(
this
.
cdp
,
2
)
this
.
cdp
.
addTimeoutFunc
(()
=>
{
this
.
cdp
.
addTimeoutFunc
(
onceFnc
(
()
=>
{
this
.
cdp
.
destory
()
this
.
cdp
.
destory
()
// 销毁 instance
// 销毁 instance
DeviceMotion
.
instance
.
destory
()
DeviceMotion
.
instance
.
destory
()
...
@@ -199,8 +200,8 @@ export class GameScene extends MotionInitScene {
...
@@ -199,8 +200,8 @@ export class GameScene extends MotionInitScene {
})
})
})
})
})
})
)
cdp
.
position
.
set
(
layers
.
stageCenterX
-
65
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
340
-
168
:
240
-
168
))
cdp
.
position
.
set
(
layers
.
stageCenterX
-
65
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
170
:
120
))
}
}
...
...
src/scenes/GameScene/MotionInit.ts
View file @
87765894
...
@@ -308,14 +308,14 @@ export class MotionInitScene extends Scene {
...
@@ -308,14 +308,14 @@ export class MotionInitScene extends Scene {
set
musicBoolean
(
m
:
boolean
)
{
set
musicBoolean
(
m
:
boolean
)
{
if
(
m
)
{
if
(
m
)
{
(
this
.
musicBtn
||
(
this
.
musicBtn
=
UI
.
Btn
(
this
,
'music-on.png'
,
this
.
onMusicClick
,
this
,
650
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
52
:
0
)))).
texture
=
RES
.
getRes
(
'music-on.png'
);
(
this
.
musicBtn
||
(
this
.
musicBtn
=
UI
.
Btn
(
this
,
'music-on.png'
,
this
.
onMusicClick
,
this
,
650
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
52
:
5
)))).
texture
=
RES
.
getRes
(
'music-on.png'
);
this
.
musicBtn
.
anchorX
=
30
this
.
musicBtn
.
anchorX
=
30
this
.
musicBtn
.
anchorY
=
30
this
.
musicBtn
.
anchorY
=
30
FYGE
.
Tween
.
get
(
this
.
musicBtn
,
{
loop
:
true
})
FYGE
.
Tween
.
get
(
this
.
musicBtn
,
{
loop
:
true
})
.
to
({
rotation
:
360
},
5000
)
.
to
({
rotation
:
360
},
5000
)
}
else
{
}
else
{
(
this
.
musicBtn
||
(
this
.
musicBtn
=
UI
.
Btn
(
this
,
'music-on.png'
,
this
.
onMusicClick
,
this
,
650
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
52
:
168
)))).
texture
=
RES
.
getRes
(
'music-off.png'
);
(
this
.
musicBtn
||
(
this
.
musicBtn
=
UI
.
Btn
(
this
,
'music-on.png'
,
this
.
onMusicClick
,
this
,
650
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
52
:
5
)))).
texture
=
RES
.
getRes
(
'music-off.png'
);
FYGE
.
Tween
.
removeTweens
(
this
.
musicBtn
)
FYGE
.
Tween
.
removeTweens
(
this
.
musicBtn
)
this
.
musicBtn
.
rotation
=
0
this
.
musicBtn
.
rotation
=
0
}
}
...
@@ -339,7 +339,7 @@ export class MotionInitScene extends Scene {
...
@@ -339,7 +339,7 @@ export class MotionInitScene extends Scene {
initUi
()
{
initUi
()
{
UI
.
Rect
(
this
,
750
,
1624
,
0xf1ebdd
,
0
,
0
,
0
)
UI
.
Rect
(
this
,
750
,
1624
,
0xf1ebdd
,
0
,
0
,
0
)
var
app
=
getApp
()
var
app
=
getApp
()
UI
.
Sp
(
this
,
app
.
isNike
?
'nike-icon.png'
:
'jordan-icon.png'
,
41
,
app
.
isLarge
?
50
+
layers
.
stageOffsetY
:
0
+
layers
.
stageOffsetY
)
UI
.
Sp
(
this
,
app
.
isNike
?
'nike-icon.png'
:
'jordan-icon.png'
,
41
,
app
.
isLarge
?
50
+
layers
.
stageOffsetY
:
5
+
layers
.
stageOffsetY
)
// 中间的小圆
// 中间的小圆
// var c = this.addChild(new FYGE.Shape())
// var c = this.addChild(new FYGE.Shape())
...
@@ -370,7 +370,7 @@ export class MotionInitScene extends Scene {
...
@@ -370,7 +370,7 @@ export class MotionInitScene extends Scene {
this
.
bitmapTextCount
.
position
.
set
(
layers
.
stageCenterX
,
layers
.
stageCenterY
+
380
)
this
.
bitmapTextCount
.
position
.
set
(
layers
.
stageCenterX
,
layers
.
stageCenterY
+
380
)
// @ts-ignore
// @ts-ignore
this
.
holdOnTxt
=
UI
.
Txt
(
this
,
'保持住!'
,
60
,
'#111111'
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
layers
.
stageWidth
,
30
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
340
-
1
68
:
240
-
16
8
),
true
)
this
.
holdOnTxt
=
UI
.
Txt
(
this
,
'保持住!'
,
60
,
'#111111'
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
layers
.
stageWidth
,
30
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
340
-
1
28
:
240
-
12
8
),
true
)
this
.
holdOnTxt
.
visible
=
false
this
.
holdOnTxt
.
visible
=
false
this
.
holdOnTxt
.
anchorX
=
layers
.
stageWidth
/
2
this
.
holdOnTxt
.
anchorX
=
layers
.
stageWidth
/
2
this
.
holdOnTxt
.
anchorY
=
30
this
.
holdOnTxt
.
anchorY
=
30
...
@@ -494,7 +494,7 @@ export class MotionInitScene extends Scene {
...
@@ -494,7 +494,7 @@ export class MotionInitScene extends Scene {
}
}
FYGE
.
Tween
.
removeTweens
(
this
.
holdOnTxt
)
FYGE
.
Tween
.
removeTweens
(
this
.
holdOnTxt
)
this
.
holdOnTxt
.
position
.
set
(
30
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
340
-
1
68
:
240
-
16
8
))
// 重新设置一下
this
.
holdOnTxt
.
position
.
set
(
30
,
layers
.
stageOffsetY
+
(
getApp
().
isLarge
?
340
-
1
28
:
240
-
12
8
))
// 重新设置一下
this
.
holdOnTxt
.
visible
=
false
this
.
holdOnTxt
.
visible
=
false
// @ts-ignore
// @ts-ignore
...
...
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