Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbox_tracingLetters
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
Sbox_tracingLetters
Commits
c19c502b
Commit
c19c502b
authored
Feb 03, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
c0d3ad25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
21 deletions
+47
-21
n_xuan1.fire
play/assets/tmpGame/scene/n_xuan1.fire
+5
-5
n_xuan1.js
play/assets/tmpGame/scene/n_xuan1.js
+42
-16
No files found.
play/assets/tmpGame/scene/n_xuan1.fire
View file @
c19c502b
...
...
@@ -189,7 +189,7 @@
"array": [
0,
0,
4
69.5806533322543
,
4
79.981048400591
,
0,
0,
0,
...
...
@@ -5224,7 +5224,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
a6cMZKz9VPqr9hCh7APcsa
"
"_id": "
00gNvkrSNPEonUOndHL7KH
"
},
{
"__type__": "cc.Label",
...
...
@@ -5260,7 +5260,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
68eDLZExhJ3rKi3Wkk17Vi
"
"_id": "
9coAEuxxVHQIalk+e+xFDk
"
},
{
"__type__": "cc.PrivateNode",
...
...
@@ -5323,7 +5323,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
e07ojz2NtIYoZeBppxhZ7a
"
"_id": "
9btbLEqFNIiqeVSFF0sswR
"
},
{
"__type__": "cc.Label",
...
...
@@ -5359,7 +5359,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
67LYV0D85IP6672RSADLKn
"
"_id": "
c11yiQHb9OmZ5JU30f5Xnw
"
},
{
"__type__": "cc.RichText",
...
...
play/assets/tmpGame/scene/n_xuan1.js
View file @
c19c502b
...
...
@@ -284,6 +284,7 @@ cc.Class({
this
.
_enableRestart
=
true
;
this
.
doneFlag
=
[
false
,
false
];
this
.
currentCase
=
0
;
this
.
_disableButtons
=
false
;
},
start
()
{
...
...
@@ -338,6 +339,9 @@ cc.Class({
repositionButton
()
{
const
bottomButtons
=
cc
.
find
(
'
Canvas/bottomButtons
'
);
bottomButtons
.
y
=
-
cc
.
winSize
.
height
/
2
+
40
const
buttonsSwitch
=
cc
.
find
(
'
Canvas/buttons
'
);
buttonsSwitch
.
y
=
-
cc
.
winSize
.
height
/
2
+
75
},
initListeners
()
{
...
...
@@ -352,7 +356,6 @@ cc.Class({
const
switch_b2s
=
cc
.
find
(
'
Canvas/buttons/switch_b2s
'
);
const
switch_s2b
=
cc
.
find
(
'
Canvas/buttons/switch_s2b
'
);
console
.
log
(
switch_b2s
,
switch_s2b
)
this
.
repositionButton
();
let
that
=
this
...
...
@@ -361,13 +364,12 @@ cc.Class({
});
btn_restart
.
on
(
'
click
'
,
async
()
=>
{
if
(
!
this
.
_enableRestart
)
{
if
(
!
this
.
_enableRestart
||
this
.
_disableButtons
)
{
return
;
}
this
.
_enableRestart
=
false
;
this
.
playEffect
(
'
按钮
'
);
await
jelly
(
btn_restart
);
btn_restart
.
active
=
false
;
this
.
pageFlyOut
();
// this.restartGame();
if
(
this
.
sharkNode
)
{
...
...
@@ -376,7 +378,6 @@ cc.Class({
}
this
.
createLetterPage
(
this
.
letter
);
setTimeout
(()
=>
{
btn_restart
.
active
=
true
;
this
.
_enableRestart
=
true
;;
},
1000
);
// this.loadNextLetter()
...
...
@@ -399,7 +400,9 @@ cc.Class({
});
switch_b2s
.
on
(
'
click
'
,
async
()
=>
{
console
.
log
(
"
switch_b2s click
"
);
if
(
this
.
_disableButtons
)
{
return
;
}
this
.
playEffect
(
'
按钮
'
);
await
jelly
(
switch_b2s
);
// this.playEffect(`letter${this.letter.toUpperCase()}`);
...
...
@@ -422,7 +425,9 @@ cc.Class({
.
start
();
});
switch_s2b
.
on
(
'
click
'
,
async
()
=>
{
console
.
log
(
"
switch_s2b click
"
);
if
(
this
.
_disableButtons
)
{
return
;
}
this
.
playEffect
(
'
按钮
'
);
await
jelly
(
switch_s2b
);
// this.playEffect(`letter${this.letter.toUpperCase()}`);
...
...
@@ -477,7 +482,9 @@ cc.Class({
btnNext
.
active
=
false
;
btnBefore
.
on
(
'
click
'
,
async
()
=>
{
console
.
log
(
"
btnBefore click
"
)
if
(
this
.
_disableButtons
)
{
return
;
}
if
(
btnClicked
)
{
return
;
}
...
...
@@ -501,7 +508,9 @@ cc.Class({
});
btnNext
.
on
(
'
click
'
,
async
()
=>
{
console
.
log
(
"
btnNext click
"
)
if
(
this
.
_disableButtons
)
{
return
;
}
if
(
btnClicked
)
{
return
;
}
...
...
@@ -1051,14 +1060,7 @@ cc.Class({
},
async
showOver
()
{
let
btn_restart
=
cc
.
find
(
'
Canvas/bottomButtons/btn_restart
'
);
btn_restart
.
active
=
false
;
// btn_restart.scaleX = 0;
// btn_restart.scaleY = 0;
setTimeout
(()
=>
{
// cc.tween(btn_restart).to(0.2, {scaleX: 1, scaleY: 1}).start();
btn_restart
.
active
=
true
;
},
5000
);
this
.
disableButtons
();
this
.
hideShark
();
// this.playEffect('放大');
...
...
@@ -1176,7 +1178,31 @@ cc.Class({
return
posList
;
},
disableButtons
(
time
)
{
time
=
time
?
time
:
5
this
.
_disableButtons
=
true
;
let
btn_restart
=
cc
.
find
(
'
Canvas/bottomButtons/btn_restart
'
);
let
btnBefore
=
cc
.
find
(
'
Canvas/bottomButtons/BtnBefore
'
);
let
btnNext
=
cc
.
find
(
'
Canvas/bottomButtons/BtnNext
'
);
let
switch_b2s
=
cc
.
find
(
'
Canvas/buttons/switch_b2s
'
);
let
switch_s2b
=
cc
.
find
(
'
Canvas/buttons/switch_s2b
'
);
btn_restart
.
opacity
=
125
;
btnBefore
.
opacity
=
125
;
btnNext
.
opacity
=
125
;
switch_b2s
.
opacity
=
125
;
switch_s2b
.
opacity
=
125
;
setTimeout
(()
=>
{
this
.
_disableButtons
=
false
;
btn_restart
.
opacity
=
255
;
btnBefore
.
opacity
=
255
;
btnNext
.
opacity
=
255
;
switch_b2s
.
opacity
=
255
;
switch_s2b
.
opacity
=
255
;
},
time
*
1000
);
},
pageFlyOut
()
{
this
.
disableButtons
(
1
)
const
letterNodeBase
=
cc
.
find
(
`Canvas/letterNodeBase`
);
letterNodeBase
.
name
=
'
letterNodeBase0
'
;
letterNodeBase
.
zIndex
=
10
;
...
...
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