Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
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
wildfirecode13
xiaoxiaole
Commits
466a18aa
Commit
466a18aa
authored
Apr 26, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复黑洞转移没填补empty的bug
parent
adfb0cde
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
8 deletions
+68
-8
MainScene.ts
egret/src/mainScene/MainScene.ts
+31
-7
Chapter26.ts
egret/src/something/chapters/Chapter26.ts
+37
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
466a18aa
...
...
@@ -1177,7 +1177,9 @@ export default class MainScene extends Scene {
switch
(
elements
[
i
])
{
//如果为0记录空格
case
ElementConfigType
.
EMPTY
:
if
(
this
.
emptys
.
indexOf
(
i
)
==-
1
){
this
.
emptys
.
push
(
i
);
}
break
;
//基础元素,枷锁,气泡,灰色毛球,褐色毛球,黑色毛球 && 石门锁,有条件的锁
case
ElementConfigType
.
BASE
:
...
...
@@ -1425,7 +1427,10 @@ export default class MainScene extends Scene {
break
;
default
:
//其他标识按空元素记
if
(
this
.
emptys
.
indexOf
(
i
)
==-
1
){
this
.
emptys
.
push
(
i
);
}
break
}
}
...
...
@@ -2224,7 +2229,10 @@ export default class MainScene extends Scene {
//去掉一个
this
.
emptys
.
splice
(
emptyIndex
,
1
);
//加上一个
if
(
this
.
emptys
.
indexOf
(
index
)
==-
1
){
this
.
emptys
.
push
(
index
);
}
lat
.
element
=
null
}
}
else
{
...
...
@@ -2272,7 +2280,10 @@ export default class MainScene extends Scene {
// this.emptys.splice(emptyIndex, 1);
Tool
.
removeEle
(
downIndex
,
this
.
emptys
)
//加上一个
if
(
this
.
emptys
.
indexOf
(
index
)
==-
1
){
this
.
emptys
.
push
(
index
);
}
lat
.
element
=
null
}
}
else
{
...
...
@@ -3435,14 +3446,24 @@ export default class MainScene extends Scene {
await
doWormHoleAI
(
this
);
// console.log("黑洞转移完毕");
//黑洞转移,使黑洞占位变空,需要添加到emptys中
//黑洞转移,使黑洞占位变空,需要添加到emptys中,
// bug修复:黑洞转移会使空的变为有东西的,需要把emptys中对应的去掉
for
(
var
_w
=
0
;
_w
<
this
.
lattices
.
length
;
_w
++
){
var
_wlattice
=
this
.
lattices
[
_w
];
if
(
_wlattice
&&!
_wlattice
.
element
&&
this
.
emptys
.
indexOf
(
_wlattice
.
index
)
==-
1
){
this
.
emptys
.
push
(
_wlattice
.
index
);
}
if
(
_wlattice
&&
_wlattice
.
element
){
var
isInempty
=
this
.
emptys
.
indexOf
(
_wlattice
.
index
);
if
(
isInempty
!=-
1
){
// console.log("bug修复,黑洞转移去空");
this
.
emptys
.
splice
(
isInempty
,
1
);
}
}
}
//棒棒糖消除
var
recoverlp2
=
this
.
checkEmtbbt
();
...
...
@@ -5278,7 +5299,10 @@ export default class MainScene extends Scene {
ele
.
addDisable
();
//添加进emptys
this
.
emptys
.
push
(
index
)
if
(
this
.
emptys
.
indexOf
(
index
)
==-
1
){
this
.
emptys
.
push
(
index
);
}
//从容器移除
this
.
elementContainer
.
removeChild
(
ele
);
//回收元素
...
...
egret/src/something/chapters/Chapter26.ts
View file @
466a18aa
...
...
@@ -110,4 +110,40 @@ export const Chapters26: ChapterData[] = [
2
,
2
,
4
,
1
,
4
,
1
,
4
,
2
,
2
,
1
,
2
,
5
,
4
,
5
,
4
,
5
,
2
,
1
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[
{
index
:
0
,
type
:
null
},
{
index
:
8
,
type
:
null
},
{
index
:
10
,
type
:
null
},
{
index
:
16
,
type
:
null
},
{
index
:
20
,
type
:
null
},
{
index
:
24
,
type
:
null
},
{
index
:
30
,
type
:
null
},
{
index
:
32
,
type
:
null
},
{
index
:
40
,
type
:
null
}
]
}
},
]
{
baseElementTypes
:
[
4
,
3
,
2
,
1
],
bubbleProbability
:
0
,
stepCount
:
27
,
passTarget
:
{
type
:
1
,
elements
:
[
{
type
:
9
,
count
:
73
}
]
},
starScores
:
[
15000
,
20000
,
25000
],
map
:
{
lattices
:
[
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
1
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
],
connectedLats
:
[],
conveyor
:
[],
conveyorConnectedLats
:
[],
// WORMHOLE: [ [ 10, 16, 70, 64 ], [ 30, 32, 50, 48 ] ],
WORMHOLE
:
[
[
10
,
16
,
70
,
64
]],
elements
:
[
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
1
,
1
,
1
,
1
,
1
,
4
,
1
,
2
,
1
,
1
,
1
,
1
,
1
,
14
,
1
,
1
,
2
,
1
,
1
,
4
,
1
,
4
,
1
,
1
,
1
,
2
,
2
,
2
,
1
,
12
,
1
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
1
,
2
,
2
,
2
,
2
,
2
,
1
,
1
,
0
,
0
,
1
,
2
,
2
,
4
,
2
,
1
,
1
,
0
,
0
,
0
,
1
,
2
,
2
,
2
,
1
,
1
,
0
,
0
,
0
,
0
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[
{
index
:
0
,
type
:
null
},
{
index
:
1
,
type
:
null
},
{
index
:
2
,
type
:
null
},
{
index
:
3
,
type
:
null
},
{
index
:
4
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
6
,
type
:
null
},
{
index
:
7
,
type
:
null
},
{
index
:
8
,
type
:
null
}
]
}
},
]
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