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
d2f51f38
Commit
d2f51f38
authored
Apr 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
猩猩的特效消除
parent
f4b7962a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
7 deletions
+54
-7
MainScene.ts
egret/src/mainScene/MainScene.ts
+54
-7
No files found.
egret/src/mainScene/MainScene.ts
View file @
d2f51f38
...
@@ -1502,6 +1502,9 @@ export default class MainScene extends Scene {
...
@@ -1502,6 +1502,9 @@ export default class MainScene extends Scene {
}
}
}
}
}
}
//特效消除猩猩
this
.
checkPongoHVEle
(
rc
[
0
],
rc
[
1
],
"hor"
);
this
.
checkPongoHVEle
(
rc
[
0
],
rc
[
1
],
"vir"
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
_converyorTag
=
true
;
this
.
_converyorTag
=
true
;
...
@@ -2662,6 +2665,9 @@ export default class MainScene extends Scene {
...
@@ -2662,6 +2665,9 @@ export default class MainScene extends Scene {
cannoFireArr
.
push
(
iemitidx
);
cannoFireArr
.
push
(
iemitidx
);
}
}
}
}
//特效消除猩猩--炮弹
var
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
=
new
Array
();
for
(
var
j
=
0
;
j
<
cannoFireArr
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
cannoFireArr
.
length
;
j
++
){
var
jemitidx
=
cannoFireArr
[
j
];
var
jemitidx
=
cannoFireArr
[
j
];
var
lat
=
this
.
lattices
[
jemitidx
];
var
lat
=
this
.
lattices
[
jemitidx
];
...
@@ -2677,6 +2683,11 @@ export default class MainScene extends Scene {
...
@@ -2677,6 +2683,11 @@ export default class MainScene extends Scene {
break
;
break
;
}
}
}
}
//提前消除了,需要修改成炮台的消除时消除
if
(
lat
&&
lat
.
element
){
var
isbreak
=
this
.
solveOneTxPgEle
(
lat
.
element
.
row
,
lat
.
element
.
column
,
lockPongoArr
);
}
}
}
canno
.
fireCanno
();
canno
.
fireCanno
();
...
@@ -2689,6 +2700,9 @@ export default class MainScene extends Scene {
...
@@ -2689,6 +2700,9 @@ export default class MainScene extends Scene {
// this.readyCannoArr.shift();
// this.readyCannoArr.shift();
// canno.resetCannoStat();
// canno.resetCannoStat();
// },200);
// },200);
this
.
solvePongoEle
(
lockPongoArr
);
}
}
getCannoArrByIdx
(
cannoidx
:
number
){
getCannoArrByIdx
(
cannoidx
:
number
){
var
arridx
:
number
=
0
;
var
arridx
:
number
=
0
;
...
@@ -2967,6 +2981,12 @@ export default class MainScene extends Scene {
...
@@ -2967,6 +2981,12 @@ export default class MainScene extends Scene {
}
}
}
}
}
}
//特效消除猩猩
this
.
checkPongoHVEle
(
lat1
.
row
,
lat1
.
column
,
"hor"
);
this
.
checkPongoHVEle
(
lat1
.
row
,
lat1
.
column
,
"vir"
);
}
}
//一个方向,一个爆炸
//一个方向,一个爆炸
else
if
((
ele1
.
effectType
<
2
||
ele2
.
effectType
<
2
)
&&
else
if
((
ele1
.
effectType
<
2
||
ele2
.
effectType
<
2
)
&&
...
@@ -3400,6 +3420,10 @@ export default class MainScene extends Scene {
...
@@ -3400,6 +3420,10 @@ export default class MainScene extends Scene {
npdata
.
ineffect
=
true
;
npdata
.
ineffect
=
true
;
}
}
}
}
//特效消除猩猩
this
.
checkPongoHVEle
(
row
,
lat
.
column
,
"hor"
);
break
;
break
;
case
EffectType
.
VERTICAL
:
case
EffectType
.
VERTICAL
:
if
(
sounds
.
indexOf
(
SoundType
.
line
)
==
-
1
)
sounds
.
push
(
SoundType
.
line
)
if
(
sounds
.
indexOf
(
SoundType
.
line
)
==
-
1
)
sounds
.
push
(
SoundType
.
line
)
...
@@ -3452,6 +3476,10 @@ export default class MainScene extends Scene {
...
@@ -3452,6 +3476,10 @@ export default class MainScene extends Scene {
npdata
.
ineffect
=
true
;
npdata
.
ineffect
=
true
;
}
}
}
}
//特效消除猩猩
this
.
checkPongoHVEle
(
lat
.
row
,
col
,
"vir"
);
break
;
break
;
}
}
}
}
...
@@ -3966,19 +3994,38 @@ export default class MainScene extends Scene {
...
@@ -3966,19 +3994,38 @@ export default class MainScene extends Scene {
var
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
=
new
Array
();
var
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
=
new
Array
();
if
(
dir
==
"hor"
){
if
(
dir
==
"hor"
){
//向左穿透猩猩
//向左穿透猩猩
for
(
var
i
=
col
;
i
>=
0
;
i
++
){
for
(
var
i
=
col
-
1
;
i
>=
0
;
i
--
){
this
.
solveOneTxPgEle
(
row
,
col
,
lockPongoArr
);
var
isbreak
=
this
.
solveOneTxPgEle
(
row
,
i
,
lockPongoArr
);
if
(
isbreak
==
2
){
break
;
}
}
}
//向右穿透猩猩
//向右穿透猩猩
for
(
var
i
=
col
;
i
<
Tool
.
colNum
;
i
++
){
for
(
var
i
=
col
+
1
;
i
<
Tool
.
colNum
;
i
++
){
var
isbreak
=
this
.
solveOneTxPgEle
(
row
,
i
,
lockPongoArr
);
if
(
isbreak
==
2
){
break
;
}
}
}
}
else
if
(
dir
==
"vir"
){
}
else
if
(
dir
==
"vir"
){
//向上
for
(
var
i
=
row
-
1
;
i
>=
0
;
i
--
){
var
isbreak
=
this
.
solveOneTxPgEle
(
i
,
col
,
lockPongoArr
);
if
(
isbreak
==
2
){
break
;
}
}
//向下
for
(
var
i
=
row
+
1
;
i
<
Tool
.
rowNum
;
i
++
){
var
isbreak
=
this
.
solveOneTxPgEle
(
i
,
col
,
lockPongoArr
);
if
(
isbreak
==
2
){
break
;
}
}
}
}
}
//本次特效消除的猩猩
this
.
solvePongoEle
(
lockPongoArr
);
}
solveOneTxPgEle
(
row
:
number
,
col
:
number
,
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
){
solveOneTxPgEle
(
row
:
number
,
col
:
number
,
lockPongoArr
:
Array
<
{
idx
:
number
,
part
:
string
}
>
){
var
eleidx
=
Tool
.
rcToIndex
(
row
,
col
);
var
eleidx
=
Tool
.
rcToIndex
(
row
,
col
);
if
(
!
this
.
lattices
[
eleidx
]
||
!
this
.
lattices
[
eleidx
].
element
)
return
1
;
if
(
!
this
.
lattices
[
eleidx
]
||
!
this
.
lattices
[
eleidx
].
element
)
return
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