Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
Project
Project
Details
Activity
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
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
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
8be14c7c
Commit
8be14c7c
authored
Apr 07, 2022
by
徐行
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
题配好了
parent
0473a6b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
26 deletions
+93
-26
VHFillNumCfg.ts
assets/sceneBundle/games/VHFillNum/script/VHFillNumCfg.ts
+79
-23
VHFillNumCtr.ts
assets/sceneBundle/games/VHFillNum/script/VHFillNumCtr.ts
+14
-3
No files found.
assets/sceneBundle/games/VHFillNum/script/VHFillNumCfg.ts
View file @
8be14c7c
...
@@ -16,54 +16,110 @@ export const vhfn_lv_1: VHFillNumCfg = {
...
@@ -16,54 +16,110 @@ export const vhfn_lv_1: VHFillNumCfg = {
row
:
4
,
row
:
4
,
column
:
4
,
column
:
4
,
numArr
:
[
numArr
:
[
[
3
,
6
,
5
,
14
],
[
3
,
2
,
4
,
11
],
[
8
,
4
,
2
,
16
],
[
2
,
3
,
5
,
11
],
[
6
,
2
,
3
,
36
],
[
1
,
4
,
2
,
9
],
[
30
,
8
,
10
,
-
1
]
[
1
,
10
,
18
,
-
1
]
],
],
emptyCtrArr
:
[
emptyCtrArr
:
[
[
1
,
1
,
0
,
1
],
[
0
,
1
,
0
,
1
],
[
1
,
0
,
1
,
1
],
[
1
,
0
,
1
,
1
],
[
1
,
0
,
1
,
1
],
[
0
,
0
,
0
,
1
],
[
1
,
1
,
1
,
1
]
[
1
,
1
,
1
,
1
]
],
],
rowSymb
:
[
rowSymb
:
[
[
"+"
,
"
+
"
,
"="
],
[
"+"
,
"
×
"
,
"="
],
[
"×"
,
"
÷
"
,
"="
],
[
"×"
,
"
+
"
,
"="
],
[
"
×
"
,
"×"
,
"="
]
[
"
+
"
,
"×"
,
"="
]
],
],
columnSymb
:
[
columnSymb
:
[
[
"
×"
,
"+"
,
"+
"
],
[
"
-"
,
"×"
,
"×
"
],
[
"
+"
,
"÷"
,
"+
"
],
[
"
×"
,
"+"
,
"-
"
],
[
"="
,
"="
,
"="
],
[
"="
,
"="
,
"="
],
],
],
options
:
[
5
,
2
,
8
]
options
:
[
1
,
2
,
3
,
4
]
}
}
export
const
vhfn_lv_2
:
VHFillNumCfg
=
{
export
const
vhfn_lv_2
:
VHFillNumCfg
=
{
row
:
4
,
row
:
4
,
column
:
4
,
column
:
4
,
numArr
:
[
numArr
:
[
[
2
,
4
,
2
,
10
],
[
3
,
6
,
5
,
23
],
[
6
,
5
,
2
,
60
],
[
4
,
2
,
3
,
5
],
[
3
,
3
,
3
,
9
],
[
5
,
5
,
4
,
5
],
[
4
,
60
,
7
,
-
1
]
[
23
,
7
,
12
,
-
1
]
],
],
emptyCtrArr
:
[
emptyCtrArr
:
[
[
1
,
0
,
1
,
1
],
[
0
,
1
,
1
,
1
],
[
0
,
0
,
1
,
1
],
[
0
,
0
,
1
,
1
],
[
0
,
1
,
0
,
1
],
[
1
,
1
,
1
,
1
]
],
rowSymb
:
[
[
"×"
,
"+"
,
"="
],
[
"÷"
,
"+"
,
"="
],
[
"÷"
,
"+"
,
"="
]
],
columnSymb
:
[
[
"+"
,
"×"
,
"+"
],
[
"×"
,
"-"
,
"+"
],
[
"="
,
"="
,
"="
],
],
options
:
[
2
,
3
,
4
,
5
]
}
export
const
vhfn_lv_3
:
VHFillNumCfg
=
{
row
:
4
,
column
:
4
,
numArr
:
[
[
10
,
3
,
19
,
11
],
[
4
,
12
,
15
,
33
],
[
7
,
18
,
9
,
9
],
[
38
,
18
,
13
,
-
1
]
],
emptyCtrArr
:
[
[
1
,
1
,
0
,
1
],
[
1
,
1
,
0
,
1
],
[
0
,
0
,
1
,
1
],
[
0
,
1
,
0
,
1
],
[
1
,
1
,
1
,
1
]
[
1
,
1
,
1
,
1
]
],
],
rowSymb
:
[
rowSymb
:
[
[
"+"
,
"×"
,
"="
],
[
"×"
,
"+"
,
"="
],
[
"×"
,
"×"
,
"="
],
[
"÷"
,
"+"
,
"="
],
[
"+"
,
"+"
,
"="
]
[
"÷"
,
"+"
,
"="
]
],
columnSymb
:
[
[
"+"
,
"×"
,
"+"
],
[
"×"
,
"-"
,
"+"
],
[
"="
,
"="
,
"="
],
],
options
:
[
4
,
7
,
9
,
12
,
19
]
}
export
const
vhfn_lv_4
:
VHFillNumCfg
=
{
row
:
4
,
column
:
4
,
numArr
:
[
[
7
,
11
,
40
,
37
],
[
8
,
4
,
5
,
7
],
[
2
,
19
,
7
,
45
],
[
23
,
25
,
56
,
-
1
]
],
emptyCtrArr
:
[
[
1
,
0
,
0
,
1
],
[
0
,
1
,
1
,
1
],
[
0
,
1
,
0
,
1
],
[
1
,
1
,
1
,
1
]
],
rowSymb
:
[
[
"×"
,
"-"
,
"="
],
[
"÷"
,
"+"
,
"="
],
[
"×"
,
"+"
,
"="
]
],
],
columnSymb
:
[
columnSymb
:
[
[
"
×"
,
"×"
,
"×
"
],
[
"
+"
,
"×"
,
"÷
"
],
[
"
÷"
,
"×"
,
"+
"
],
[
"
×"
,
"-"
,
"×
"
],
[
"="
,
"="
,
"="
],
[
"="
,
"="
,
"="
],
],
],
options
:
[
5
,
6
,
4
,
3
]
options
:
[
2
,
7
,
8
,
11
,
40
]
}
}
assets/sceneBundle/games/VHFillNum/script/VHFillNumCtr.ts
View file @
8be14c7c
import
{
_decorator
,
Component
,
Node
,
Prefab
,
Label
,
CCFloat
,
Vec3
,
UITransform
,
instantiate
,
v3
,
Color
,
Toggle
,
director
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
Prefab
,
Label
,
CCFloat
,
Vec3
,
UITransform
,
instantiate
,
v3
,
Color
,
Toggle
,
director
,
isValid
}
from
'cc'
;
import
{
countdownMus
,
failMus
,
succMus
}
from
'../../../../startFolder/script/common/AudioDef'
;
import
{
countdownMus
,
failMus
,
succMus
}
from
'../../../../startFolder/script/common/AudioDef'
;
import
{
AudioMgr
}
from
'../../../../startFolder/script/common/AudioMgr'
;
import
{
AudioMgr
}
from
'../../../../startFolder/script/common/AudioMgr'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
...
@@ -11,7 +11,7 @@ import { GameDescView } from '../../commonView/script/GameDescView';
...
@@ -11,7 +11,7 @@ import { GameDescView } from '../../commonView/script/GameDescView';
import
{
ScoreFailView
}
from
'../../commonView/script/ScoreFailView'
;
import
{
ScoreFailView
}
from
'../../commonView/script/ScoreFailView'
;
import
{
ScoreSuccView
}
from
'../../commonView/script/ScoreSuccView'
;
import
{
ScoreSuccView
}
from
'../../commonView/script/ScoreSuccView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
VHFillNumCfg
,
vhfn_lv_1
,
vhfn_lv_2
}
from
'./VHFillNumCfg'
;
import
{
VHFillNumCfg
,
vhfn_lv_1
,
vhfn_lv_2
,
vhfn_lv_3
,
vhfn_lv_4
}
from
'./VHFillNumCfg'
;
import
{
VHFillNumItem
,
VHFN_ITEM_TYPE
}
from
'./VHFillNumItem'
;
import
{
VHFillNumItem
,
VHFN_ITEM_TYPE
}
from
'./VHFillNumItem'
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -57,7 +57,7 @@ export class VHFillNumCtr extends Component {
...
@@ -57,7 +57,7 @@ export class VHFillNumCtr extends Component {
private
itemPosIfoArr
:
ItemPosIfo
[]
=
[];
private
itemPosIfoArr
:
ItemPosIfo
[]
=
[];
private
row
=
4
;
private
row
=
4
;
private
column
=
4
;
private
column
=
4
;
private
level
=
2
;
private
level
=
4
;
private
levelData
:
VHFillNumCfg
=
null
!
;
private
levelData
:
VHFillNumCfg
=
null
!
;
private
selNum
=
0
;
private
selNum
=
0
;
...
@@ -466,6 +466,12 @@ export class VHFillNumCtr extends Component {
...
@@ -466,6 +466,12 @@ export class VHFillNumCtr extends Component {
case
2
:
case
2
:
this
.
levelData
=
vhfn_lv_2
;
this
.
levelData
=
vhfn_lv_2
;
break
;
break
;
case
3
:
this
.
levelData
=
vhfn_lv_3
;
break
;
case
4
:
this
.
levelData
=
vhfn_lv_4
;
break
;
default
:
default
:
this
.
levelData
=
vhfn_lv_1
;
this
.
levelData
=
vhfn_lv_1
;
break
;
break
;
...
@@ -475,6 +481,9 @@ export class VHFillNumCtr extends Component {
...
@@ -475,6 +481,9 @@ export class VHFillNumCtr extends Component {
}
}
creOptions
()
{
creOptions
()
{
for
(
let
i
=
1
;
i
<
this
.
optionsTogsNode
.
children
.
length
;
++
i
)
{
if
(
isValid
(
this
.
optionsTogsNode
.
children
[
i
],
true
))
this
.
optionsTogsNode
.
children
[
i
].
destroy
();
}
while
(
this
.
optionsTogsNode
.
children
.
length
<
this
.
levelData
.
options
.
length
)
{
while
(
this
.
optionsTogsNode
.
children
.
length
<
this
.
levelData
.
options
.
length
)
{
this
.
optionsTogsNode
.
addChild
(
instantiate
(
this
.
optionsTogsNode
.
children
[
0
]));
this
.
optionsTogsNode
.
addChild
(
instantiate
(
this
.
optionsTogsNode
.
children
[
0
]));
}
}
...
@@ -487,6 +496,8 @@ export class VHFillNumCtr extends Component {
...
@@ -487,6 +496,8 @@ export class VHFillNumCtr extends Component {
}
}
this
.
optionsTogsNode
.
children
[
0
].
getComponent
(
Toggle
)
!
.
isChecked
=
true
;
this
.
optionsTogsNode
.
children
[
0
].
getComponent
(
Toggle
)
!
.
isChecked
=
true
;
this
.
selNum
=
this
.
levelData
.
options
[
0
];
this
.
selNum
=
this
.
levelData
.
options
[
0
];
this
.
optionsTogsNode
.
scale
=
this
.
levelData
.
options
.
length
>
4
?
v3
(
0.7
,
0.7
,
1
)
:
v3
(
1
,
1
,
1
);
}
}
...
...
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