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
cd4c30f3
Commit
cd4c30f3
authored
Aug 09, 2021
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏数据调试
parent
ac2e77f9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
227 additions
and
172 deletions
+227
-172
index.html
index.html
+1
-1
p1-b.png
resource/GameScene/p1-b.png
+0
-0
p1.png
resource/GameScene/p1.png
+0
-0
ResJson.ts
src/ResJson.ts
+144
-144
GameConfig.ts
src/scenes/GameScene/GameConfig.ts
+1
-1
GameScene.ts
src/scenes/GameScene/GameScene.ts
+66
-16
MotionInit.ts
src/scenes/GameScene/MotionInit.ts
+15
-10
No files found.
index.html
View file @
cd4c30f3
...
...
@@ -22,7 +22,7 @@
<!-- <script src="libs/svgaParser.min1.js"></script> -->
<script
src=
"//yun.duiba.com.cn/js-libs/vConsole/3.3.4/vconsole.min.js"
></script>
<script>
//
var vConsole = new VConsole();
var
vConsole
=
new
VConsole
();
</script>
<style>
html
,
...
...
resource/GameScene/p1-b.png
View replaced file @
ac2e77f9
View file @
cd4c30f3
13.5 KB
|
W:
|
H:
12.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resource/GameScene/p1.png
View replaced file @
ac2e77f9
View file @
cd4c30f3
30.8 KB
|
W:
|
H:
107 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/ResJson.ts
View file @
cd4c30f3
...
...
@@ -82,31 +82,9 @@ export const ResJson = {
"sh"
:
183
,
"ro"
:
true
},
"p1-b.png"
:
{
"p1
2
-b.png"
:
{
"x"
:
939
,
"y"
:
2
,
"w"
:
377
,
"h"
:
537
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
377
,
"sh"
:
537
,
"ro"
:
false
},
"p1.png"
:
{
"x"
:
939
,
"y"
:
541
,
"w"
:
377
,
"h"
:
537
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
377
,
"sh"
:
537
,
"ro"
:
false
},
"p12-b.png"
:
{
"x"
:
754
,
"y"
:
1080
,
"w"
:
335
,
"h"
:
535
,
"ox"
:
0
,
...
...
@@ -116,8 +94,8 @@ export const ResJson = {
"ro"
:
false
},
"p12.png"
:
{
"x"
:
1318
,
"y"
:
2
,
"x"
:
939
,
"y"
:
539
,
"w"
:
335
,
"h"
:
535
,
"ox"
:
0
,
...
...
@@ -127,8 +105,8 @@ export const ResJson = {
"ro"
:
false
},
"p20-b.png"
:
{
"x"
:
1091
,
"y"
:
10
80
,
"x"
:
754
,
"y"
:
10
76
,
"w"
:
287
,
"h"
:
535
,
"ox"
:
0
,
...
...
@@ -138,8 +116,8 @@ export const ResJson = {
"ro"
:
false
},
"p20.png"
:
{
"x"
:
1
318
,
"y"
:
539
,
"x"
:
1
276
,
"y"
:
2
,
"w"
:
287
,
"h"
:
535
,
"ox"
:
0
,
...
...
@@ -149,41 +127,41 @@ export const ResJson = {
"ro"
:
false
},
"p11-b.png"
:
{
"x"
:
2
,
"y"
:
1
628
,
"x"
:
1043
,
"y"
:
1
076
,
"w"
:
496
,
"h"
:
533
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
496
,
"sh"
:
533
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p11.png"
:
{
"x"
:
537
,
"y"
:
1628
,
"x"
:
1565
,
"y"
:
2
,
"w"
:
496
,
"h"
:
533
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
496
,
"sh"
:
533
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p13-b.png"
:
{
"x"
:
1
072
,
"y"
:
1617
,
"x"
:
1
276
,
"y"
:
539
,
"w"
:
421
,
"h"
:
533
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
421
,
"sh"
:
533
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p13.png"
:
{
"x"
:
1
655
,
"y"
:
2
,
"x"
:
1
541
,
"y"
:
1074
,
"w"
:
421
,
"h"
:
533
,
"ox"
:
0
,
...
...
@@ -193,8 +171,8 @@ export const ResJson = {
"ro"
:
false
},
"balance_guidance.png"
:
{
"x"
:
1
380
,
"y"
:
1076
,
"x"
:
1
699
,
"y"
:
537
,
"w"
:
258
,
"h"
:
532
,
"ox"
:
0
,
...
...
@@ -204,8 +182,8 @@ export const ResJson = {
"ro"
:
false
},
"p3-b.png"
:
{
"x"
:
2078
,
"y"
:
2
,
"x"
:
1541
,
"y"
:
1609
,
"w"
:
532
,
"h"
:
520
,
"ox"
:
0
,
...
...
@@ -215,30 +193,30 @@ export const ResJson = {
"ro"
:
true
},
"p3.png"
:
{
"x"
:
2
078
,
"y"
:
536
,
"x"
:
2
,
"y"
:
1628
,
"w"
:
532
,
"h"
:
520
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
532
,
"sh"
:
520
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p9-b.png"
:
{
"x"
:
1607
,
"y"
:
161
0
,
"x"
:
754
,
"y"
:
161
3
,
"w"
:
487
,
"h"
:
532
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
487
,
"sh"
:
532
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p9.png"
:
{
"x"
:
1640
,
"y"
:
1070
,
"x"
:
2063
,
"y"
:
2
,
"w"
:
487
,
"h"
:
532
,
"ox"
:
0
,
...
...
@@ -248,30 +226,30 @@ export const ResJson = {
"ro"
:
false
},
"p4-b.png"
:
{
"x"
:
2
,
"y"
:
2126
,
"x"
:
1959
,
"y"
:
537
,
"w"
:
499
,
"h"
:
531
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
499
,
"sh"
:
531
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p4.png"
:
{
"x"
:
535
,
"y"
:
2126
,
"x"
:
1964
,
"y"
:
1070
,
"w"
:
499
,
"h"
:
531
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
499
,
"sh"
:
531
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p6-b.png"
:
{
"x"
:
1072
,
"y"
:
2099
,
"x"
:
2063
,
"y"
:
1603
,
"w"
:
526
,
"h"
:
368
,
"ox"
:
0
,
...
...
@@ -281,41 +259,41 @@ export const ResJson = {
"ro"
:
true
},
"p6.png"
:
{
"x"
:
144
2
,
"y"
:
2
099
,
"x"
:
2
,
"y"
:
2
150
,
"w"
:
526
,
"h"
:
368
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
526
,
"sh"
:
368
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p2-b.png"
:
{
"x"
:
181
2
,
"y"
:
2
099
,
"x"
:
2
,
"y"
:
2
520
,
"w"
:
524
,
"h"
:
518
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
524
,
"sh"
:
518
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p2.png"
:
{
"x"
:
2600
,
"y"
:
2
,
"x"
:
528
,
"y"
:
2
520
,
"w"
:
524
,
"h"
:
518
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
524
,
"sh"
:
518
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p18-b.png"
:
{
"x"
:
1
607
,
"y"
:
539
,
"x"
:
1
243
,
"y"
:
1611
,
"w"
:
270
,
"h"
:
521
,
"ox"
:
0
,
...
...
@@ -325,8 +303,8 @@ export const ResJson = {
"ro"
:
false
},
"p18.png"
:
{
"x"
:
2129
,
"y"
:
1070
,
"x"
:
1243
,
"y"
:
2134
,
"w"
:
270
,
"h"
:
521
,
"ox"
:
0
,
...
...
@@ -336,19 +314,19 @@ export const ResJson = {
"ro"
:
false
},
"p10-b.png"
:
{
"x"
:
2141
,
"y"
:
159
3
,
"x"
:
1515
,
"y"
:
214
3
,
"w"
:
502
,
"h"
:
513
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
502
,
"sh"
:
513
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p10.png"
:
{
"x"
:
2
600
,
"y"
:
528
,
"x"
:
2
019
,
"y"
:
2143
,
"w"
:
502
,
"h"
:
513
,
"ox"
:
0
,
...
...
@@ -358,8 +336,8 @@ export const ResJson = {
"ro"
:
true
},
"p5-b.png"
:
{
"x"
:
2
656
,
"y"
:
103
2
,
"x"
:
2
552
,
"y"
:
2
,
"w"
:
460
,
"h"
:
513
,
"ox"
:
0
,
...
...
@@ -369,8 +347,8 @@ export const ResJson = {
"ro"
:
false
},
"p5.png"
:
{
"x"
:
2
656
,
"y"
:
154
7
,
"x"
:
2
552
,
"y"
:
51
7
,
"w"
:
460
,
"h"
:
513
,
"ox"
:
0
,
...
...
@@ -380,8 +358,8 @@ export const ResJson = {
"ro"
:
false
},
"p15-b.png"
:
{
"x"
:
2
332
,
"y"
:
2097
,
"x"
:
2
534
,
"y"
:
1032
,
"w"
:
499
,
"h"
:
463
,
"ox"
:
0
,
...
...
@@ -391,63 +369,63 @@ export const ResJson = {
"ro"
:
true
},
"p15.png"
:
{
"x"
:
2
,
"y"
:
2627
,
"x"
:
2
534
,
"y"
:
1533
,
"w"
:
499
,
"h"
:
463
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
499
,
"sh"
:
463
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"p14-b.png"
:
{
"x"
:
503
,
"y"
:
2
627
,
"x"
:
2534
,
"y"
:
2
034
,
"w"
:
438
,
"h"
:
460
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
438
,
"sh"
:
460
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"p14.png"
:
{
"x"
:
943
,
"y"
:
2
627
,
"x"
:
2534
,
"y"
:
2
474
,
"w"
:
438
,
"h"
:
460
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
438
,
"sh"
:
460
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"p8-b.png"
:
{
"x"
:
1383
,
"y"
:
26
2
7
,
"x"
:
2019
,
"y"
:
26
4
7
,
"w"
:
308
,
"h"
:
460
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
308
,
"sh"
:
460
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"p8.png"
:
{
"x"
:
1693
,
"y"
:
2
627
,
"x"
:
530
,
"y"
:
2
150
,
"w"
:
308
,
"h"
:
460
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
308
,
"sh"
:
460
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"p7-b.png"
:
{
"x"
:
2003
,
"y"
:
2
625
,
"x"
:
3014
,
"y"
:
2
,
"w"
:
426
,
"h"
:
443
,
"ox"
:
0
,
...
...
@@ -457,8 +435,8 @@ export const ResJson = {
"ro"
:
false
},
"p7.png"
:
{
"x"
:
2431
,
"y"
:
2598
,
"x"
:
3014
,
"y"
:
447
,
"w"
:
426
,
"h"
:
443
,
"ox"
:
0
,
...
...
@@ -468,8 +446,8 @@ export const ResJson = {
"ro"
:
false
},
"p17-b.png"
:
{
"x"
:
2
,
"y"
:
309
2
,
"x"
:
2
999
,
"y"
:
103
2
,
"w"
:
434
,
"h"
:
398
,
"ox"
:
0
,
...
...
@@ -479,8 +457,8 @@ export const ResJson = {
"ro"
:
false
},
"p17.png"
:
{
"x"
:
438
,
"y"
:
309
2
,
"x"
:
2999
,
"y"
:
143
2
,
"w"
:
434
,
"h"
:
398
,
"ox"
:
0
,
...
...
@@ -490,41 +468,41 @@ export const ResJson = {
"ro"
:
false
},
"p19-b.png"
:
{
"x"
:
2003
,
"y"
:
3070
,
"x"
:
1054
,
"y"
:
2658
,
"w"
:
416
,
"h"
:
364
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
416
,
"sh"
:
364
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p19.png"
:
{
"x"
:
2369
,
"y"
:
3070
,
"x"
:
1472
,
"y"
:
2658
,
"w"
:
416
,
"h"
:
364
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
416
,
"sh"
:
364
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p16-b.png"
:
{
"x"
:
2
735
,
"y"
:
3043
,
"x"
:
2
999
,
"y"
:
1832
,
"w"
:
406
,
"h"
:
360
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
406
,
"sh"
:
360
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"p16.png"
:
{
"x"
:
874
,
"y"
:
3089
,
"x"
:
2996
,
"y"
:
2194
,
"w"
:
406
,
"h"
:
360
,
"ox"
:
0
,
...
...
@@ -533,20 +511,42 @@ export const ResJson = {
"sh"
:
360
,
"ro"
:
false
},
"p1-b.png"
:
{
"x"
:
2996
,
"y"
:
2556
,
"w"
:
321
,
"h"
:
368
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
321
,
"sh"
:
368
,
"ro"
:
true
},
"p1.png"
:
{
"x"
:
2
,
"y"
:
3040
,
"w"
:
321
,
"h"
:
368
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
321
,
"sh"
:
368
,
"ro"
:
true
},
"nump.png"
:
{
"x"
:
260
0
,
"y"
:
1032
,
"x"
:
53
0
,
"y"
:
2460
,
"w"
:
52
,
"h"
:
59
,
"ox"
:
1
,
"oy"
:
0
,
"sw"
:
54
,
"sh"
:
59
,
"ro"
:
fals
e
"ro"
:
tru
e
},
"num0.png"
:
{
"x"
:
1072
,
"y"
:
2
04
0
,
"x"
:
591
,
"y"
:
2
46
0
,
"w"
:
39
,
"h"
:
57
,
"ox"
:
1
,
...
...
@@ -556,8 +556,8 @@ export const ResJson = {
"ro"
:
false
},
"num3.png"
:
{
"x"
:
1113
,
"y"
:
2
04
0
,
"x"
:
632
,
"y"
:
2
46
0
,
"w"
:
38
,
"h"
:
57
,
"ox"
:
1
,
...
...
@@ -567,8 +567,8 @@ export const ResJson = {
"ro"
:
false
},
"num8.png"
:
{
"x"
:
1153
,
"y"
:
2
04
0
,
"x"
:
672
,
"y"
:
2
46
0
,
"w"
:
38
,
"h"
:
57
,
"ox"
:
0
,
...
...
@@ -578,8 +578,8 @@ export const ResJson = {
"ro"
:
false
},
"num2.png"
:
{
"x"
:
1193
,
"y"
:
2
04
0
,
"x"
:
712
,
"y"
:
2
46
0
,
"w"
:
40
,
"h"
:
56
,
"ox"
:
0
,
...
...
@@ -589,8 +589,8 @@ export const ResJson = {
"ro"
:
false
},
"num5.png"
:
{
"x"
:
1235
,
"y"
:
2
04
0
,
"x"
:
754
,
"y"
:
2
46
0
,
"w"
:
37
,
"h"
:
56
,
"ox"
:
1
,
...
...
@@ -600,30 +600,30 @@ export const ResJson = {
"ro"
:
false
},
"num6.png"
:
{
"x"
:
2735
,
"y"
:
3451
,
"x"
:
793
,
"y"
:
2460
,
"w"
:
38
,
"h"
:
56
,
"ox"
:
1
,
"oy"
:
0
,
"sw"
:
39
,
"sh"
:
57
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"num9.png"
:
{
"x"
:
8
74
,
"y"
:
3451
,
"x"
:
8
33
,
"y"
:
2460
,
"w"
:
38
,
"h"
:
56
,
"ox"
:
1
,
"oy"
:
0
,
"sw"
:
38
,
"sh"
:
57
,
"ro"
:
tru
e
"ro"
:
fals
e
},
"num1.png"
:
{
"x"
:
1
274
,
"y"
:
2040
,
"x"
:
1
515
,
"y"
:
1611
,
"w"
:
22
,
"h"
:
55
,
"ox"
:
1
,
...
...
@@ -633,8 +633,8 @@ export const ResJson = {
"ro"
:
false
},
"num4.png"
:
{
"x"
:
1298
,
"y"
:
2
04
0
,
"x"
:
873
,
"y"
:
2
46
0
,
"w"
:
40
,
"h"
:
55
,
"ox"
:
1
,
...
...
@@ -644,8 +644,8 @@ export const ResJson = {
"ro"
:
false
},
"num7.png"
:
{
"x"
:
1340
,
"y"
:
2
04
0
,
"x"
:
915
,
"y"
:
2
46
0
,
"w"
:
42
,
"h"
:
55
,
"ox"
:
1
,
...
...
@@ -729,5 +729,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16284
80167
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16284
95232
/resource/"
}
\ No newline at end of file
src/scenes/GameScene/GameConfig.ts
View file @
cd4c30f3
...
...
@@ -3,7 +3,7 @@ export const GameCfg = {
ispeed
:
0
,
// 初速度
fpsScale
:
1000
/
60
,
// 帧变数
resisteAcc
:
0.06
,
// 摩擦力反加速度
rc
:
2
0
,
// 误差值,距离中心点的误差值
rc
:
4
0
,
// 误差值,距离中心点的误差值
duanpingValue
:
8
/
180
*
Math
.
PI
,
// 默认小于 8 度就算端平
iTime
:
12000
,
// 初始化游戏时间
...
...
src/scenes/GameScene/GameScene.ts
View file @
cd4c30f3
...
...
@@ -100,7 +100,7 @@ export class GameScene extends MotionInitScene {
this
.
cdp
.
addTimeoutFunc
(()
=>
{
// this.cdp.visible = false
//@ts-ignore
my
.
showToast
({
my
&&
my
.
showToast
({
content
:
'游戏结束'
})
})
...
...
@@ -112,7 +112,7 @@ export class GameScene extends MotionInitScene {
initGame
()
{
this
.
cdp
.
start
()
this
.
gameEle
=
this
.
addChild
(
new
GameEle
(
'p1
-b
.png'
,
this
.
centerp
,
()
=>
{
this
.
gameEle
=
this
.
addChild
(
new
GameEle
(
'p1.png'
,
this
.
centerp
,
()
=>
{
this
.
score
+=
1
this
.
gIndex
+=
1
this
.
cdp
.
initTime
=
GameCfg
.
iTime
...
...
@@ -138,20 +138,6 @@ export class GameScene extends MotionInitScene {
}
var
posList
=
[
{
x
:
0
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
0
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
}
]
export
class
GameEle
extends
Container
{
rorate
:
number
// 旋转角度
vx
=
GameCfg
.
ispeed
// 当前x速度, 有初速度
...
...
@@ -182,7 +168,21 @@ export class GameEle extends Container {
initUi
(
tn
:
string
)
{
if
(
tn
)
{
this
.
sprite
=
UI
.
Sp
(
this
,
tn
)
var
posList
=
[
{
x
:
0
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
0
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
}
]
var
pos
=
posList
[
Math
.
floor
(
Math
.
random
()
*
3
)]
console
.
log
(
posList
,
pos
)
this
.
position
.
set
(
pos
.
x
,
pos
.
y
)
// this.sprite.scaleX = 0.5
// this.sprite.scaleY = 0.5
...
...
@@ -200,6 +200,19 @@ export class GameEle extends Container {
resetInit
(
tName
:
string
)
{
this
.
sprite
.
texture
=
RES
.
getRes
(
tName
)
var
posList
=
[
{
x
:
0
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
0
},
{
x
:
layers
.
stageWidth
+
layers
.
stageOffsetX
,
y
:
layers
.
stageHeight
+
layers
.
stageOffsetY
}
]
var
pos
=
posList
[
Math
.
floor
(
Math
.
random
()
*
3
)]
this
.
position
.
set
(
pos
.
x
,
pos
.
y
)
...
...
@@ -296,16 +309,53 @@ export class GameEle extends Container {
this
.
setRotation
(
this
.
k
*
(
len
-
GameCfg
.
rc
))
if
(
this
.
isIn
)
{
this
.
isIn
=
false
FYGE
.
Tween
.
removeTweens
(
this
)
GDispatcher
.
dispatchEvent
(
'focus-out'
)
}
}
else
{
if
(
!
this
.
isIn
)
{
this
.
isIn
=
true
this
.
vx
=
0
this
.
vy
=
0
this
.
setRotation
(
0
)
FYGE
.
Tween
.
get
(
this
)
.
to
({
x
:
this
.
fixedCenter
.
x
,
y
:
this
.
fixedCenter
.
y
},
400
)
GDispatcher
.
dispatchEvent
(
'focus-in'
,
()
=>
{
this
.
finishFunc
()
})
}
}
// var len = pos2Len(this, this.fixedCenter)
// if (!this.lastLen) this.lastLen = len
// if (len > this.lastLen && this.isIn) {
// this.isIn = false
// FYGE.Tween.removeTweens(this)
// GDispatcher.dispatchEvent('focus-out')
// }
// this.lastLen = len
// this.setRotation(this.k * (len - 20)) // vtodo 最后20 只是平移
// if (len <= GameCfg.rc) {
// if (!this.isIn) {
// this.isIn = true
// this.vx = 0
// this.vy = 0
// this.setRotation(0)
// FYGE.Tween.get(this)
// .to({
// x: this.fixedCenter.x,
// y: this.fixedCenter.y
// }, 400)
// GDispatcher.dispatchEvent('focus-in', () => {
// this.finishFunc()
// })
// }
// }
}
update
()
{
...
...
src/scenes/GameScene/MotionInit.ts
View file @
cd4c30f3
...
...
@@ -123,6 +123,15 @@ export class MotionInitScene extends Scene {
.
arc
(
layers
.
stageCenterX
,
layers
.
stageCenterY
,
240
,
0
,
2
*
Math
.
PI
)
.
endFill
()
this
.
focusProgress
=
this
.
addChild
(
new
CircleProgressBar
({
x
:
layers
.
stageCenterX
,
y
:
layers
.
stageCenterY
,
// vtodo 这里后面可能会调试
radius
:
260
,
lineWidth
:
15
,
value
:
0
}))
this
.
focusProgress
.
visible
=
false
this
.
centerp
=
setCenterPos
(
UI
.
Sp
(
this
,
'p1-b.png'
))
var
bitMapc
=
Tools
.
getNumTextures
(
'num'
)
...
...
@@ -175,13 +184,8 @@ export class MotionInitScene extends Scene {
// type: 'fill',
// typeColor: 0x111111
// }))
this
.
focusProgress
=
this
.
addChild
(
new
CircleProgressBar
({
x
:
layers
.
stageCenterX
,
y
:
layers
.
stageCenterY
,
// vtodo 这里后面可能会调试
radius
:
260
,
lineWidth
:
15
,
value
:
0
}))
this
.
focusProgress
.
visible
=
true
this
.
bitmapTextCount
.
visible
=
true
FYGE
.
Tween
.
get
(
this
.
holdOnTxt
)
.
set
({
visible
:
true
,
alpha
:
0.4
})
...
...
@@ -192,6 +196,7 @@ export class MotionInitScene extends Scene {
this
.
bitmapTextCount
.
text
=
((
this
.
focusProgress
.
value
*
100
)
>>
0
)
+
"%"
}
})
.
set
({
value
:
0
})
.
to
({
value
:
1
},
3000
)
.
call
(()
=>
{
console
.
log
(
'%c 成功套种'
,
'color: green'
)
...
...
@@ -202,11 +207,11 @@ export class MotionInitScene extends Scene {
},
400
)
removeTimeCountDown
()
{
if
(
this
.
focusProgress
)
{
if
(
this
.
focusProgress
.
visible
)
{
this
.
unshoot
()
FYGE
.
Tween
.
removeTweens
(
this
.
focusProgress
)
this
.
removeChild
(
this
.
focusProgress
)
this
.
bitmapTextCount
.
text
=
''
this
.
focusProgress
.
visible
=
false
this
.
bitmapTextCount
.
visible
=
false
}
FYGE
.
Tween
.
removeTweens
(
this
.
holdOnTxt
)
...
...
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