Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
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
middleLayer_for_NJ_lite
Commits
4935c781
Commit
4935c781
authored
Nov 02, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加家长验证
parent
ec0811ad
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
414 additions
and
447 deletions
+414
-447
middleLayer_for_NJ_lite.fire
...iddleLayer_for_NJ_lite/scene/middleLayer_for_NJ_lite.fire
+407
-443
middleLayer.ts
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
+7
-4
No files found.
assets/middleLayer_for_NJ_lite/scene/middleLayer_for_NJ_lite.fire
View file @
4935c781
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_NJ_lite/script/middleLayer.ts
View file @
4935c781
...
@@ -169,18 +169,21 @@ export default class NewClass extends middleLayerBase {
...
@@ -169,18 +169,21 @@ export default class NewClass extends middleLayerBase {
// 家长验证
// 家长验证
parentProtect
(
callback
)
{
parentProtect
(
callback
)
{
const
parentProtectNode
=
cc
.
find
(
`middleLayer/iosActiveLayer/parent_protect`
);
const
parentProtectNode
=
cc
.
find
(
`middleLayer/iosActiveLayer/parent_protect`
);
const
num1Node
=
cc
.
find
(
"
/num1
"
,
parentProtectNode
);
const
num1Node
=
cc
.
find
(
"
/num
_
1
"
,
parentProtectNode
);
const
num2Node
=
cc
.
find
(
"
/num2
"
,
parentProtectNode
);
const
num2Node
=
cc
.
find
(
"
/num
_
2
"
,
parentProtectNode
);
const
okBtn
=
cc
.
find
(
"
/active
"
,
parentProtectNode
);
const
okBtn
=
cc
.
find
(
"
/active
"
,
parentProtectNode
);
const
input
=
cc
.
find
(
"
/result
"
,
parentProtectNode
).
getComponent
(
cc
.
EditBox
);
const
input
=
cc
.
find
(
"
/result
"
,
parentProtectNode
).
getComponent
(
cc
.
EditBox
);
const
num1
=
Math
.
ceil
(
Math
.
random
()
*
10
);
const
num1
=
Math
.
floor
(
Math
.
random
()
*
10
);
const
num2
=
Math
.
ceil
(
Math
.
random
()
*
10
);
const
num2
=
Math
.
floor
(
Math
.
random
()
*
10
);
const
res
=
num1
*
num2
;
const
res
=
num1
*
num2
;
parentProtectNode
.
active
=
true
;
cc
.
find
(
`num_
${
num1
}
`
,
num1Node
).
active
=
true
;
cc
.
find
(
`num_
${
num1
}
`
,
num1Node
).
active
=
true
;
cc
.
find
(
`num_
${
num2
}
`
,
num2Node
).
active
=
true
;
cc
.
find
(
`num_
${
num2
}
`
,
num2Node
).
active
=
true
;
okBtn
.
off
(
"
click
"
);
okBtn
.
on
(
"
click
"
,
()
=>
{
okBtn
.
on
(
"
click
"
,
()
=>
{
const
activeCode
=
input
.
textLabel
.
string
;
const
activeCode
=
input
.
textLabel
.
string
;
if
(
activeCode
==
res
+
""
)
{
if
(
activeCode
==
res
+
""
)
{
...
...
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