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
f4b7962a
Commit
f4b7962a
authored
Apr 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
猩猩暂存
parent
5a96ef06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+32
-2
No files found.
egret/src/mainScene/MainScene.ts
View file @
f4b7962a
...
...
@@ -3943,7 +3943,7 @@ export default class MainScene extends Scene {
let
lat
=
this
.
lattices
[
index
];
if
(
lat
&&
lat
.
element
&&
lat
.
element
.
type
==
ElementType
.
Pongo
)
{
const
type
=
ele
.
type
;
if
(
this
.
passElements
&&
this
.
passElements
[
type
]
!=
0
)
{
// if(this.passElements && this.passElements[type] != 0) {//不清楚是干啥的
if
(
lat
.
element
.
hasState
(
StateType
.
PongoLockState
)){
var
ilockpongo
=
{
idx
:
lat
.
element
.
index
,
...
...
@@ -3954,7 +3954,7 @@ export default class MainScene extends Scene {
//解锁猩猩被锁状态
lat
.
element
.
removePongoLockStat
();
}
}
//
}
}
}
...
...
@@ -3963,12 +3963,42 @@ export default class MainScene extends Scene {
}
//横纵特效穿过解救猩猩
checkPongoHVEle
(
row
:
number
,
col
:
number
,
dir
:
string
){
var
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
=
new
Array
();
if
(
dir
==
"hor"
){
//向左穿透猩猩
for
(
var
i
=
col
;
i
>=
0
;
i
++
){
this
.
solveOneTxPgEle
(
row
,
col
,
lockPongoArr
);
}
//向右穿透猩猩
for
(
var
i
=
col
;
i
<
Tool
.
colNum
;
i
++
){
}
}
else
if
(
dir
==
"vir"
){
}
}
solveOneTxPgEle
(
row
:
number
,
col
:
number
,
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
){
var
eleidx
=
Tool
.
rcToIndex
(
row
,
col
);
if
(
!
this
.
lattices
[
eleidx
]
||
!
this
.
lattices
[
eleidx
].
element
)
return
1
;
var
lat
=
this
.
lattices
[
eleidx
];
var
iscannoblock
=
Tool
.
judgeIscannoBlock
(
lat
);
if
(
iscannoblock
){
return
2
;
}
if
(
lat
&&
lat
.
element
&&
lat
.
element
.
type
==
ElementType
.
Pongo
)
{
//是猩猩
if
(
lat
.
element
.
hasState
(
StateType
.
PongoLockState
)){
var
ilockpongo
=
{
idx
:
lat
.
element
.
index
,
part
:
lat
.
element
.
inPongoPart
}
lockPongoArr
.
push
(
ilockpongo
);
lat
.
element
.
removePongoLockStat
();
}
}
return
3
;
}
solvePongoEle
(
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
){
//对本次解锁的猩猩部分,分成对应的几个猩猩
var
alockPongo
:
Array
<
number
>
=
[];
//只存左上
...
...
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