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
5efe3dd0
Commit
5efe3dd0
authored
Feb 14, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
42eac260
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+15
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
5efe3dd0
...
@@ -1170,6 +1170,9 @@ export default class MainScene extends Scene {
...
@@ -1170,6 +1170,9 @@ export default class MainScene extends Scene {
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
rc
[
0
]
||
lat
.
column
==
rc
[
1
]))
{
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
rc
[
0
]
||
lat
.
column
==
rc
[
1
]))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
{
this
.
eliminatedElements
.
push
(
i
);
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
}
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
//算直线+直线LL
//算直线+直线LL
this
.
pushScoreAni
(
baseScore
*
1
*
effectBaseTimes
.
LL
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
1
*
effectBaseTimes
.
LL
,
Tool
.
getPositionByIndex
(
i
))
...
@@ -2198,6 +2201,9 @@ export default class MainScene extends Scene {
...
@@ -2198,6 +2201,9 @@ export default class MainScene extends Scene {
if
(
Tool
.
judgeEliminate
(
lat
))
{
if
(
Tool
.
judgeEliminate
(
lat
))
{
//本来没必要判断特效组合时是否有重复的消除元素,但是recoverEle里会有判断石头或果冻的加入,造成重复
//本来没必要判断特效组合时是否有重复的消除元素,但是recoverEle里会有判断石头或果冻的加入,造成重复
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
}
//两个魔力鸟分数MM
//两个魔力鸟分数MM
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
MM
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
MM
,
Tool
.
getPositionByIndex
(
i
))
...
@@ -2273,6 +2279,9 @@ export default class MainScene extends Scene {
...
@@ -2273,6 +2279,9 @@ export default class MainScene extends Scene {
var
lat
=
this
.
lattices
[
i
];
var
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
lat1
.
row
||
lat
.
column
==
lat1
.
column
))
{
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
lat1
.
row
||
lat
.
column
==
lat1
.
column
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
}
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
//线与线
//线与线
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
LL
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
LL
,
Tool
.
getPositionByIndex
(
i
))
...
@@ -2297,6 +2306,9 @@ export default class MainScene extends Scene {
...
@@ -2297,6 +2306,9 @@ export default class MainScene extends Scene {
if
(
Tool
.
judgeEliminate
(
lat
)
&&
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
2
||
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
2
))
{
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
2
||
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
2
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
}
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
//线和炸弹
//线和炸弹
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
EL
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
EL
,
Tool
.
getPositionByIndex
(
i
))
...
@@ -2322,6 +2334,9 @@ export default class MainScene extends Scene {
...
@@ -2322,6 +2334,9 @@ export default class MainScene extends Scene {
if
(
Tool
.
judgeEliminate
(
lat
)
&&
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
3
&&
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
3
))
{
(
Math
.
abs
(
lat
.
row
-
lat1
.
row
)
<
3
&&
Math
.
abs
(
lat
.
column
-
lat1
.
column
)
<
3
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
}
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
if
(
Tool
.
judgeHasScore
(
lat
.
element
))
{
//两个炸弹
//两个炸弹
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
EE
,
Tool
.
getPositionByIndex
(
i
))
this
.
pushScoreAni
(
baseScore
*
this
.
effectContinuityTimes
*
effectBaseTimes
.
EE
,
Tool
.
getPositionByIndex
(
i
))
...
...
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