Commit f039786 1 parent 55a78e8 commit f039786 Copy full SHA for f039786
File tree 9 files changed +1440
-262
lines changed
9 files changed +1440
-262
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 445
445
},
446
446
"_contentSize": {
447
447
"__type__": "cc.Size",
448
- "width": 300 ,
448
+ "width": 280 ,
449
449
"height": 80
450
450
},
451
451
"_rotationX": 0,
Original file line number Diff line number Diff line change
1
+ {
2
+ " ver " : " 1.0.1" ,
3
+ " uuid " : " 86e3e9da-0f80-44b3-85ff-71c2b577fe71" ,
4
+ " subMetas " : {}
5
+ }
Original file line number Diff line number Diff line change
1
+ cc . Class ( {
2
+ extends : cc . Component ,
3
+
4
+ properties : {
5
+ newScore : {
6
+ default : null ,
7
+ type : cc . Label ,
8
+ } ,
9
+ restartBtn : {
10
+ default : null ,
11
+ type : cc . Button ,
12
+ } ,
13
+ historyBtn : {
14
+ default : null ,
15
+ type : cc . Button ,
16
+ } ,
17
+ quitBtn : {
18
+ default : null ,
19
+ type : cc . Button ,
20
+ }
21
+ } ,
22
+
23
+ // use this for initialization
24
+ onLoad : function ( ) {
25
+ this . newScore . string = D . commonState . gameScore ? D . commonState . gameScore . toString ( ) : '0' ;
26
+ } ,
27
+ restartGame : function ( ) {
28
+ cc . director . loadScene ( 'Game' ) ;
29
+ } ,
30
+ quitGame : function ( ) {
31
+ cc . director . loadScene ( 'Start' ) ;
32
+ } ,
33
+
34
+
35
+ // called every frame, uncomment this function to activate update callback
36
+ // update: function (dt) {
37
+
38
+ // },
39
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ " ver " : " 1.0.5" ,
3
+ " uuid " : " a8ea067e-277e-4e37-aa5b-aba4f8c00006" ,
4
+ " isPlugin " : false,
5
+ " loadPluginInWeb " : true,
6
+ " loadPluginInNative " : true,
7
+ " loadPluginInEditor " : false,
8
+ " subMetas " : {}
9
+ }
Original file line number Diff line number Diff line change @@ -57,11 +57,10 @@ cc.Class({
57
57
}
58
58
} ,
59
59
onHandleDestroy : function ( ) {
60
- // this.node.destroy();
61
60
// 暂停正在运行的场景,该暂停只会停止游戏逻辑执行,但是不会停止渲染和 UI 响应
62
61
this . offDrag ( ) ;
63
- // this.pause();
64
- cc . director . pause ( ) ;
62
+ // 游戏结束转场
63
+ this . mainScript . gameOver ( ) ;
65
64
}
66
65
67
66
// called every frame, uncomment this function to activate update callback
Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ cc.Class({
83
83
changeScore : function ( score ) {
84
84
D . commonState . gameScore += score ;
85
85
this . scoreDisplay . string = D . commonState . gameScore . toString ( ) ;
86
- }
86
+ } ,
87
+ // 游戏结束
88
+ gameOver : function ( ) {
89
+ cc . director . loadScene ( 'End' ) ;
90
+ } ,
87
91
88
92
// called every frame, uncomment this function to activate update callback
89
93
// update: function (dt) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ cc.Class({
20
20
} ,
21
21
22
22
startGame : function ( ) {
23
- console . log ( 'game start' )
23
+ // 转场
24
24
cc . director . loadScene ( 'Game' ) ;
25
25
}
26
26
You can’t perform that action at this time.
0 commit comments