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
5a96ef06
Commit
5a96ef06
authored
Apr 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
猩猩暂存
parent
76e3f656
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
MainScene.ts
egret/src/mainScene/MainScene.ts
+24
-3
doSandAI.ts
egret/src/mainScene/doSandAI.ts
+1
-1
getChapter.ts
egret/src/something/chapters/getChapter.ts
+1
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
5a96ef06
...
...
@@ -2449,17 +2449,23 @@ export default class MainScene extends Scene {
return
;
}
if
(
this
.
freepongoArr
.
length
==
1
){
//拍块
console
.
log
(
"一只猩猩拍块"
);
this
.
pongoPaiKuang
(
this
.
freepongoArr
[
0
]);
var
pongotl
=
this
.
freepongoArr
.
shift
();
this
.
gopongoArr
.
push
(
pongotl
);
if
(
this
.
gopongoArr
.
indexOf
(
pongotl
)
==-
1
){
this
.
gopongoArr
.
push
(
pongotl
);
}
this
.
eliminate
();
return
;
}
if
(
this
.
freepongoArr
.
length
>
1
){
//清场
console
.
log
(
"多只猩猩清场"
);
this
.
pongoClearScene
();
for
(
var
fp
=
this
.
freepongoArr
.
length
-
1
;
fp
>=
0
;
fp
--
){
var
fptl
=
this
.
freepongoArr
.
splice
(
fp
,
1
)[
0
];
this
.
gopongoArr
.
push
(
fptl
);
if
(
this
.
gopongoArr
.
indexOf
(
fptl
)
==-
1
){
this
.
gopongoArr
.
push
(
fptl
);
}
}
this
.
eliminate
();
return
;
...
...
@@ -3926,6 +3932,7 @@ export default class MainScene extends Scene {
freepongoArr
:
Array
<
number
>
=
[];
//准备离开的猩猩
gopongoArr
:
Array
<
number
>
=
[];
//相邻消除解救猩猩
checkPongoNebEle
(
lat0
:
Lattice
,
ele
?:
Element
)
{
if
(
!
lat0
||
!
ele
)
return
;
var
indexs
=
this
.
getNextIndexs
(
lat0
);
...
...
@@ -3951,6 +3958,18 @@ export default class MainScene extends Scene {
}
}
//本次全地图解锁的猩猩部分处理
this
.
solvePongoEle
(
lockPongoArr
);
}
//横纵特效穿过解救猩猩
checkPongoHVEle
(
row
:
number
,
col
:
number
,
dir
:
string
){
if
(
dir
==
"hor"
){
}
else
if
(
dir
==
"vir"
){
}
}
solvePongoEle
(
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
){
//对本次解锁的猩猩部分,分成对应的几个猩猩
var
alockPongo
:
Array
<
number
>
=
[];
//只存左上
...
...
@@ -3992,7 +4011,9 @@ export default class MainScene extends Scene {
//猩猩自由了
if
(
!
tlpartstat
&&!
trpartstat
&&!
blpartstat
&&!
brpartstat
){
this
.
freepongoArr
.
push
(
tlpongoidx
);
if
(
this
.
freepongoArr
.
indexOf
(
tlpongoidx
)
==-
1
){
this
.
freepongoArr
.
push
(
tlpongoidx
);
}
}
}
}
...
...
egret/src/mainScene/doSandAI.ts
View file @
5a96ef06
...
...
@@ -70,7 +70,7 @@ const judgeActionIndex = (index: number, lattices: Lattice[]): number => {
!
lattices
[
i
].
block
&&
!
lattices
[
i
].
ice
&&
!
lattices
[
i
].
element
.
monster
)
||
lattices
[
i
].
element
.
inPongoPart
//猩猩支持流沙
(
lattices
[
i
]
&&
lattices
[
i
].
element
&&
lattices
[
i
].
element
.
inPongoPart
)
//猩猩支持流沙
)
{
return
i
}
...
...
egret/src/something/chapters/getChapter.ts
View file @
5a96ef06
...
...
@@ -72,7 +72,7 @@ chapters.forEach((chapter,index) => {
export
function
getChapterData
(
index
:
number
):
ChapterData
{
//没有数据就返回第一关数据
//todo
// return chapters[576
];
return
chapters
[
595
];
return
chapters
[
index
]
||
chapters
[
576
];
}
...
...
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