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
87826b84
Commit
87826b84
authored
May 07, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整特效铺草
parent
986a796d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
54 deletions
+36
-54
MainScene.ts
egret/src/mainScene/MainScene.ts
+32
-50
Chapter28.ts
egret/src/something/chapters/Chapter28.ts
+4
-4
No files found.
egret/src/mainScene/MainScene.ts
View file @
87826b84
...
@@ -397,7 +397,6 @@ export default class MainScene extends Scene {
...
@@ -397,7 +397,6 @@ export default class MainScene extends Scene {
turfingArr
:
Array
<
number
>
=
[]
turfingArr
:
Array
<
number
>
=
[]
constructor
(){
constructor
(){
super
();
super
();
// console.log('mainscene-------constructor');
window
[
'gm'
]
=
this
.
gm
;
window
[
'gm'
]
=
this
.
gm
;
//基础ui
//基础ui
//目标
//目标
...
@@ -498,7 +497,6 @@ export default class MainScene extends Scene {
...
@@ -498,7 +497,6 @@ export default class MainScene extends Scene {
super
.
start
();
super
.
start
();
this
.
resetMainScene
();
this
.
resetMainScene
();
// console.log("mainscene---------start",data,data.chapter);
// window['gm'] = this.gm;
// window['gm'] = this.gm;
//第几关
//第几关
this
.
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
this
.
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
...
@@ -691,11 +689,9 @@ export default class MainScene extends Scene {
...
@@ -691,11 +689,9 @@ export default class MainScene extends Scene {
mvdata
=
cannoparticlemvdata
;
mvdata
=
cannoparticlemvdata
;
}
}
if
(
mvdata
){
if
(
mvdata
){
// console.log("复用mvdata,免加载");
if
(
!
mv
){
if
(
!
mv
){
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
mvdata
);
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
mvdata
);
}
else
{
}
else
{
// console.log("复用了炮台动画");
}
}
this
.
initCannoMv
(
mv
,
jsvgname
,
icannobianhao
);
this
.
initCannoMv
(
mv
,
jsvgname
,
icannobianhao
);
}
else
{
}
else
{
...
@@ -797,7 +793,6 @@ export default class MainScene extends Scene {
...
@@ -797,7 +793,6 @@ export default class MainScene extends Scene {
//该遍历之后尽量简化下
//该遍历之后尽量简化下
getCannoByBianhao
(
cannoidx
:
number
):
Element
{
getCannoByBianhao
(
cannoidx
:
number
):
Element
{
var
canno
:
Element
;
var
canno
:
Element
;
// console.log("获取大炮",cannoidx,this.cannoidxArr);
for
(
var
i
=
0
;
i
<
this
.
cannoidxArr
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
cannoidxArr
.
length
;
i
++
){
var
ilattice
=
this
.
lattices
[
this
.
cannoidxArr
[
i
]];
var
ilattice
=
this
.
lattices
[
this
.
cannoidxArr
[
i
]];
if
(
ilattice
&&
ilattice
.
element
&&
ilattice
.
element
.
type
==
ElementType
.
CANNO
){
if
(
ilattice
&&
ilattice
.
element
&&
ilattice
.
element
.
type
==
ElementType
.
CANNO
){
...
@@ -1086,7 +1081,6 @@ export default class MainScene extends Scene {
...
@@ -1086,7 +1081,6 @@ export default class MainScene extends Scene {
onehole
.
y
=
jholepos
[
1
];
onehole
.
y
=
jholepos
[
1
];
onehole
.
name
=
"wormhole_"
+
i
+
"_"
+
j
;
onehole
.
name
=
"wormhole_"
+
i
+
"_"
+
j
;
// console.log("添加了一个黑洞",onehole);
}
}
}
else
{
}
else
{
console
.
error
(
i
+
"号线仅存在一个黑洞????"
);
console
.
error
(
i
+
"号线仅存在一个黑洞????"
);
...
@@ -1143,7 +1137,6 @@ export default class MainScene extends Scene {
...
@@ -1143,7 +1137,6 @@ export default class MainScene extends Scene {
if
(
isGrass
(
latticesD
[
i
])){
if
(
isGrass
(
latticesD
[
i
])){
this
.
lattices
[
i
].
grass
=
latticeblock
.
grass
;
this
.
lattices
[
i
].
grass
=
latticeblock
.
grass
;
console
.
log
(
"石门上的grass"
,
i
,
this
.
lattices
[
i
].
grass
);
}
}
}
}
if
(
latticeDisplay
)
{
if
(
latticeDisplay
)
{
...
@@ -1210,9 +1203,7 @@ export default class MainScene extends Scene {
...
@@ -1210,9 +1203,7 @@ export default class MainScene extends Scene {
var
elements
=
this
.
chapterData
.
map
.
elements
||
Tool
.
setNumber01
(
this
.
chapterData
.
map
.
lattices
.
slice
());
var
elements
=
this
.
chapterData
.
map
.
elements
||
Tool
.
setNumber01
(
this
.
chapterData
.
map
.
lattices
.
slice
());
//猩猩初始时加入
//猩猩初始时加入
var
pongoArr
:
Array
<
{
tl
:
number
,
tr
:
number
,
bl
:
number
,
br
:
number
}
>
=
new
Array
();
var
pongoArr
:
Array
<
{
tl
:
number
,
tr
:
number
,
bl
:
number
,
br
:
number
}
>
=
new
Array
();
// console.log("开始initElement",this.chapter);
for
(
let
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
// console.log("initElement遍历-------",i);
//如果对应格子为空,直接跳过,
//如果对应格子为空,直接跳过,
if
(
!
this
.
lattices
[
i
])
continue
;
if
(
!
this
.
lattices
[
i
])
continue
;
var
p
=
Tool
.
getPositionByIndex
(
i
);
var
p
=
Tool
.
getPositionByIndex
(
i
);
...
@@ -1237,7 +1228,6 @@ export default class MainScene extends Scene {
...
@@ -1237,7 +1228,6 @@ export default class MainScene extends Scene {
if
(
!
ele
)
{
if
(
!
ele
)
{
ele
=
new
Element
(
type
)
ele
=
new
Element
(
type
)
}
else
{
}
else
{
// console.log("initElement复用ele",i,elements[i],Tool.indexToRc(i));
ele
.
reset
(
type
)
ele
.
reset
(
type
)
}
}
ele
.
x
=
p
[
0
];
ele
.
x
=
p
[
0
];
...
@@ -1273,7 +1263,6 @@ export default class MainScene extends Scene {
...
@@ -1273,7 +1263,6 @@ export default class MainScene extends Scene {
if
(
!
lol
)
{
if
(
!
lol
)
{
lol
=
new
Element
(
ElementType
.
LOLLIPOP
)
lol
=
new
Element
(
ElementType
.
LOLLIPOP
)
}
else
{
}
else
{
// console.log("initElement复用ele",i,elements[i],Tool.indexToRc(i));
lol
.
reset
(
ElementType
.
LOLLIPOP
)
lol
.
reset
(
ElementType
.
LOLLIPOP
)
}
}
lol
.
x
=
p
[
0
];
lol
.
x
=
p
[
0
];
...
@@ -1287,7 +1276,6 @@ export default class MainScene extends Scene {
...
@@ -1287,7 +1276,6 @@ export default class MainScene extends Scene {
if
(
!
rock
)
{
if
(
!
rock
)
{
rock
=
new
Element
(
ElementType
.
ROCK
)
rock
=
new
Element
(
ElementType
.
ROCK
)
}
else
{
}
else
{
// console.log("initElement复用ele",i,elements[i],Tool.indexToRc(i));
rock
.
reset
(
ElementType
.
ROCK
)
rock
.
reset
(
ElementType
.
ROCK
)
}
}
rock
.
x
=
p
[
0
];
rock
.
x
=
p
[
0
];
...
@@ -1388,7 +1376,6 @@ export default class MainScene extends Scene {
...
@@ -1388,7 +1376,6 @@ export default class MainScene extends Scene {
var
onepongodata
=
this
.
createOnePongoByTl
(
i
);
var
onepongodata
=
this
.
createOnePongoByTl
(
i
);
pongoArr
.
push
(
onepongodata
);
pongoArr
.
push
(
onepongodata
);
}
else
{
}
else
{
// console.log("是已经创建的猩猩的一部分")
}
}
//猩猩每部分默认被锁住
//猩猩每部分默认被锁住
let
pongo
:
Element
=
Tool
.
getElement
(
ElementType
.
Pongo
);
let
pongo
:
Element
=
Tool
.
getElement
(
ElementType
.
Pongo
);
...
@@ -1631,7 +1618,6 @@ export default class MainScene extends Scene {
...
@@ -1631,7 +1618,6 @@ export default class MainScene extends Scene {
//侦听事件
//侦听事件
initEvents
()
{
initEvents
()
{
// console.log('mainscene-----------开始监听事件----initEvents');
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
settingBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_settingBtn
,
this
)
this
.
settingBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_settingBtn
,
this
)
this
.
questionBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
)
this
.
questionBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
)
...
@@ -1658,7 +1644,6 @@ export default class MainScene extends Scene {
...
@@ -1658,7 +1644,6 @@ export default class MainScene extends Scene {
removeEvents
()
{
removeEvents
()
{
// console.log('mainscene-------removeEvents');
this
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
settingBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_settingBtn
,
this
);
this
.
settingBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_settingBtn
,
this
);
this
.
questionBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
)
this
.
questionBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
)
...
@@ -1701,7 +1686,6 @@ export default class MainScene extends Scene {
...
@@ -1701,7 +1686,6 @@ export default class MainScene extends Scene {
this
.
cannoEffect
=
new
Array
();
this
.
cannoEffect
=
new
Array
();
}
}
destroy
()
{
destroy
()
{
// console.log("mainscene-------------destroy");
super
.
destroy
();
super
.
destroy
();
}
}
...
@@ -1941,7 +1925,6 @@ export default class MainScene extends Scene {
...
@@ -1941,7 +1925,6 @@ export default class MainScene extends Scene {
// }
// }
var
grassArr
=
new
Array
();
var
grassArr
=
new
Array
();
var
canturgrass
=
this
.
judgeTurfing
(
index
);
var
canturgrass
=
this
.
judgeTurfing
(
index
);
// console.log("能够蔓延出去",canturgrass);
//新增石头阻挡
//新增石头阻挡
var
elimitarr
=
this
.
getEliPassCannoStone
(
rc
[
0
],
rc
[
1
]);
var
elimitarr
=
this
.
getEliPassCannoStone
(
rc
[
0
],
rc
[
1
]);
for
(
var
j
=
0
;
j
<
elimitarr
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
elimitarr
.
length
;
j
++
){
...
@@ -2484,12 +2467,9 @@ export default class MainScene extends Scene {
...
@@ -2484,12 +2467,9 @@ export default class MainScene extends Scene {
//能掉落,记录元素动画
//能掉落,记录元素动画
anis
.
push
({
ele
:
latFall
.
element
,
indexs
:
[{
index
:
indexMy
,
type
:
type
}]});
anis
.
push
({
ele
:
latFall
.
element
,
indexs
:
[{
index
:
indexMy
,
type
:
type
}]});
//去掉
//去掉
// console.log(emptys)
// console.log(indexFall)
emptys
.
splice
(
i
,
1
);
emptys
.
splice
(
i
,
1
);
//在剩下emptys的加上一个,正上方的那个
//在剩下emptys的加上一个,正上方的那个
// Tool.insertEX(indexFall, emptys)
// Tool.insertEX(indexFall, emptys)
// console.log(emptys)
// emptys.push(indexFall)
// emptys.push(indexFall)
emptys
.
splice
(
i
+
1
,
0
,
indexFall
);
emptys
.
splice
(
i
+
1
,
0
,
indexFall
);
// Tool.removeEle(indexMy,emptys)
// Tool.removeEle(indexMy,emptys)
...
@@ -2910,7 +2890,6 @@ export default class MainScene extends Scene {
...
@@ -2910,7 +2890,6 @@ export default class MainScene extends Scene {
this
.
scoreAnis
.
length
=
0
;
this
.
scoreAnis
.
length
=
0
;
this
.
score
+=
scoreAll
;
this
.
score
+=
scoreAll
;
this
.
oneStepScore
+=
scoreAll
;
this
.
oneStepScore
+=
scoreAll
;
// console.log(this.score)
//this.eliminatedElements已为0;对有特效的特殊处理,又会添加进eliminatedElements,
//this.eliminatedElements已为0;对有特效的特殊处理,又会添加进eliminatedElements,
//必须在上面得分动效后,因为下面这波重新出现的元素要在下一次出现
//必须在上面得分动效后,因为下面这波重新出现的元素要在下一次出现
this
.
effectEliminate
(
effectIndexs
,
pcannostatArr
);
this
.
effectEliminate
(
effectIndexs
,
pcannostatArr
);
...
@@ -2994,7 +2973,6 @@ export default class MainScene extends Scene {
...
@@ -2994,7 +2973,6 @@ export default class MainScene extends Scene {
// return;
// return;
// }
// }
if
(
this
.
freepongoArr
.
length
==
1
){
//拍块
if
(
this
.
freepongoArr
.
length
==
1
){
//拍块
// console.log("一只猩猩拍块");
// this.pongoPaiKuang(this.freepongoArr[0]);
// this.pongoPaiKuang(this.freepongoArr[0]);
// var pongotl = this.freepongoArr.shift();
// var pongotl = this.freepongoArr.shift();
// if(this.gopongoArr.indexOf(pongotl)==-1){
// if(this.gopongoArr.indexOf(pongotl)==-1){
...
@@ -3025,7 +3003,6 @@ export default class MainScene extends Scene {
...
@@ -3025,7 +3003,6 @@ export default class MainScene extends Scene {
return
;
return
;
}
}
if
(
this
.
freepongoArr
.
length
>
1
){
//清场
if
(
this
.
freepongoArr
.
length
>
1
){
//清场
// console.log("多只猩猩清场",this.freepongoArr.length,JSON.stringify(this.freepongoArr));
// this.pongoClearScene();
// this.pongoClearScene();
// for(var fp=this.freepongoArr.length-1;fp>=0;fp--){
// for(var fp=this.freepongoArr.length-1;fp>=0;fp--){
// var fptl = this.freepongoArr.splice(fp,1)[0];
// var fptl = this.freepongoArr.splice(fp,1)[0];
...
@@ -3093,7 +3070,6 @@ export default class MainScene extends Scene {
...
@@ -3093,7 +3070,6 @@ export default class MainScene extends Scene {
//棒棒糖消除
//棒棒糖消除
var
recoverlp1
=
this
.
checkEmtbbt
();
var
recoverlp1
=
this
.
checkEmtbbt
();
if
(
recoverlp1
>
0
){
if
(
recoverlp1
>
0
){
// console.log("传送带棒棒糖消除");
this
.
fall
(()
=>
{
this
.
fall
(()
=>
{
this
.
fallCallback
();
this
.
fallCallback
();
})
})
...
@@ -3137,7 +3113,6 @@ export default class MainScene extends Scene {
...
@@ -3137,7 +3113,6 @@ export default class MainScene extends Scene {
this
.
_checkMtag
.
block
=
false
;
this
.
_checkMtag
.
block
=
false
;
const
blockResult
=
await
this
.
checkAllBlock
();
const
blockResult
=
await
this
.
checkAllBlock
();
if
(
blockResult
&&
blockResult
.
length
&&
blockResult
.
some
(
item
=>
item
))
{
if
(
blockResult
&&
blockResult
.
length
&&
blockResult
.
some
(
item
=>
item
))
{
// console.log('有至少一个门翻转过来了', blockResult);
this
.
eliminate
();
this
.
eliminate
();
return
;
return
;
}
}
...
@@ -3208,13 +3183,29 @@ export default class MainScene extends Scene {
...
@@ -3208,13 +3183,29 @@ export default class MainScene extends Scene {
//如果早已通关,正在结算
//如果早已通关,正在结算
if
(
this
.
hasPassed
)
{
if
(
this
.
hasPassed
)
{
// console.log("结算检测---------------------弹窗检测3");
//如果原先特效还有,
//如果原先特效还有,
if
(
!
this
.
isCountingTime
)
{
if
(
!
this
.
isCountingTime
)
{
this
.
terminateSteps
();
this
.
terminateSteps
();
}
}
//如果只有步数转化的,不能再进结算,
//如果只有步数转化的,不能再进结算,
else
{
else
{
var
effectElements
=
[],
elements
=
[];
for
(
var
i
=
Tool
.
colNum
*
Tool
.
rowNum
-
1
;
i
>=
0
;
i
--
)
{
var
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeBaseEle
(
lat
)
&&!
lat
.
element
.
hasState
(
StateType
.
BLOCK_LOCK
))
{
if
(
lat
.
element
.
effectType
!=
null
)
{
effectElements
.
push
(
i
);
}
else
{
elements
.
push
(
lat
.
element
)
}
}
}
if
(
effectElements
.
length
)
{
Array
.
prototype
.
push
.
apply
(
this
.
eliminatedElements
,
effectElements
);
this
.
eliminate
();
}
else
{
console
.
log
(
"可以结束"
);
}
return
;
return
;
//通关了
//通关了
//提交分数等
//提交分数等
...
@@ -3476,7 +3467,6 @@ export default class MainScene extends Scene {
...
@@ -3476,7 +3467,6 @@ export default class MainScene extends Scene {
}
}
//加分
//加分
if
(
iscannoblock
){
if
(
iscannoblock
){
// console.log("炮台石头消除");
break
;
break
;
}
}
...
@@ -3563,7 +3553,6 @@ export default class MainScene extends Scene {
...
@@ -3563,7 +3553,6 @@ export default class MainScene extends Scene {
if
(
inidx
!=-
1
){
if
(
inidx
!=-
1
){
this
.
wormFireworks
.
splice
(
inidx
,
1
);
this
.
wormFireworks
.
splice
(
inidx
,
1
);
if
(
this
.
wormFireworks
.
length
==
0
&&
this
.
_checkMtag
.
wormhole
&&!
this
.
incheckFall
){
if
(
this
.
wormFireworks
.
length
==
0
&&
this
.
_checkMtag
.
wormhole
&&!
this
.
incheckFall
){
// console.log("黑洞上的烟花播放完毕");
this
.
aiMotionCheckDieMap
();
this
.
aiMotionCheckDieMap
();
}
}
}
}
...
@@ -3572,13 +3561,11 @@ export default class MainScene extends Scene {
...
@@ -3572,13 +3561,11 @@ export default class MainScene extends Scene {
* 果冻蔓延和气泡变色需要重新检查死图
* 果冻蔓延和气泡变色需要重新检查死图
*/
*/
async
aiMotionCheckDieMap
()
{
async
aiMotionCheckDieMap
()
{
// console.log("重置点击验证");
this
.
incheckFall
=
false
;
this
.
incheckFall
=
false
;
//黑洞转移
//黑洞转移
if
(
this
.
_checkMtag
.
wormhole
){
if
(
this
.
_checkMtag
.
wormhole
){
let
wormholes
=
this
.
chapterData
.
map
.
WORMHOLE
;
let
wormholes
=
this
.
chapterData
.
map
.
WORMHOLE
;
if
(
wormholes
&&
wormholes
.
length
>
0
){
if
(
wormholes
&&
wormholes
.
length
>
0
){
// console.log("虫洞位移检测",this.wormHolePromise.length);
if
(
this
.
wormFireworks
.
length
>
0
){
if
(
this
.
wormFireworks
.
length
>
0
){
return
// console.error("等待烟花放完");
return
// console.error("等待烟花放完");
}
}
...
@@ -3588,10 +3575,8 @@ export default class MainScene extends Scene {
...
@@ -3588,10 +3575,8 @@ export default class MainScene extends Scene {
});
});
// console.log("开始黑洞转移");
await
doWormHoleAI
(
this
);
await
doWormHoleAI
(
this
);
// console.log("黑洞转移完毕");
//黑洞转移,使黑洞占位变空,需要添加到emptys中,
//黑洞转移,使黑洞占位变空,需要添加到emptys中,
// bug修复:黑洞转移会使空的变为有东西的,需要把emptys中对应的去掉
// bug修复:黑洞转移会使空的变为有东西的,需要把emptys中对应的去掉
...
@@ -3605,7 +3590,6 @@ export default class MainScene extends Scene {
...
@@ -3605,7 +3590,6 @@ export default class MainScene extends Scene {
if
(
_wlattice
&&
_wlattice
.
element
){
if
(
_wlattice
&&
_wlattice
.
element
){
var
isInempty
=
this
.
emptys
.
indexOf
(
_wlattice
.
index
);
var
isInempty
=
this
.
emptys
.
indexOf
(
_wlattice
.
index
);
if
(
isInempty
!=-
1
){
if
(
isInempty
!=-
1
){
// console.log("bug修复,黑洞转移去空");
this
.
emptys
.
splice
(
isInempty
,
1
);
this
.
emptys
.
splice
(
isInempty
,
1
);
}
}
}
}
...
@@ -3615,7 +3599,6 @@ export default class MainScene extends Scene {
...
@@ -3615,7 +3599,6 @@ export default class MainScene extends Scene {
//棒棒糖消除
//棒棒糖消除
var
recoverlp2
=
this
.
checkEmtbbt
();
var
recoverlp2
=
this
.
checkEmtbbt
();
if
(
recoverlp2
>
0
){
if
(
recoverlp2
>
0
){
// console.log("传送带棒棒糖消除");
// this.fall(()=>{
// this.fall(()=>{
// this.fallCallback();
// this.fallCallback();
// })
// })
...
@@ -3657,7 +3640,6 @@ export default class MainScene extends Scene {
...
@@ -3657,7 +3640,6 @@ export default class MainScene extends Scene {
this
.
gameGuide
.
show
()
this
.
gameGuide
.
show
()
}
}
;
;
// console.log("重置点击222");
//允许移动
//允许移动
this
.
enableMouseEvt
(
true
);
this
.
enableMouseEvt
(
true
);
//检查是否有红包炸弹弹框;有就弹出;然后置空
//检查是否有红包炸弹弹框;有就弹出;然后置空
...
@@ -4289,7 +4271,6 @@ export default class MainScene extends Scene {
...
@@ -4289,7 +4271,6 @@ export default class MainScene extends Scene {
if
(
!
ele
)
continue
;
if
(
!
ele
)
continue
;
var
p
=
Tool
.
getPositionByIndex
(
index
);
var
p
=
Tool
.
getPositionByIndex
(
index
);
var
canturgrass
=
this
.
judgeTurfing
(
index
);
var
canturgrass
=
this
.
judgeTurfing
(
index
);
console
.
log
(
"特效传播草坪"
,
canturgrass
);
var
grassArr
=
new
Array
();
var
grassArr
=
new
Array
();
var
turfCp
=
new
Array
();
var
turfCp
=
new
Array
();
switch
(
ele
.
effectType
)
{
switch
(
ele
.
effectType
)
{
...
@@ -4325,11 +4306,11 @@ export default class MainScene extends Scene {
...
@@ -4325,11 +4306,11 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
element
.
effectType
!=
EffectType
.
MAGICLION
&&
//不是魔力鸟
this
.
lattices
[
i
].
element
.
effectType
!=
EffectType
.
MAGICLION
&&
//不是魔力鸟
this
.
lattices
[
i
].
element
.
type
==
type
//类型相等
this
.
lattices
[
i
].
element
.
type
==
type
//类型相等
)
{
)
{
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
this
.
lattices
[
i
])){
grassArr
.
push
(
i
);
}
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
this
.
lattices
[
i
])){
grassArr
.
push
(
i
);
}
this
.
eliminatedElements
.
push
(
i
);
this
.
eliminatedElements
.
push
(
i
);
//无特效未枷锁,无毛球的参与旋转
//无特效未枷锁,无毛球的参与旋转
if
(
Tool
.
judgeMagicRotate
(
this
.
lattices
[
i
].
element
))
{
if
(
Tool
.
judgeMagicRotate
(
this
.
lattices
[
i
].
element
))
{
...
@@ -4370,10 +4351,11 @@ export default class MainScene extends Scene {
...
@@ -4370,10 +4351,11 @@ export default class MainScene extends Scene {
}
}
if
(
Tool
.
judgeEliminate
(
this
.
lattices
[
i
])
&&
if
(
Tool
.
judgeEliminate
(
this
.
lattices
[
i
])
&&
(
Math
.
abs
(
this
.
lattices
[
i
].
row
-
lat
.
row
)
<
2
&&
Math
.
abs
(
this
.
lattices
[
i
].
column
-
lat
.
column
)
<
2
))
{
(
Math
.
abs
(
this
.
lattices
[
i
].
row
-
lat
.
row
)
<
2
&&
Math
.
abs
(
this
.
lattices
[
i
].
column
-
lat
.
column
)
<
2
))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
this
.
lattices
[
i
])){
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
this
.
lattices
[
i
])){
grassArr
.
push
(
i
);
grassArr
.
push
(
i
);
}
}
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
this
.
eliminatedElements
.
push
(
i
);
this
.
eliminatedElements
.
push
(
i
);
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
if
(
this
.
lattices
[
i
].
element
.
type
==
ElementType
.
FISH
)
{
this
.
lattices
[
i
].
element
.
nextFishState
();
this
.
lattices
[
i
].
element
.
nextFishState
();
...
@@ -4420,10 +4402,11 @@ export default class MainScene extends Scene {
...
@@ -4420,10 +4402,11 @@ export default class MainScene extends Scene {
for
(
var
j1
=
0
;
j1
<
elimitarr
.
length
;
j1
++
){
for
(
var
j1
=
0
;
j1
<
elimitarr
.
length
;
j1
++
){
var
jelidx
=
elimitarr
[
j1
];
var
jelidx
=
elimitarr
[
j1
];
var
jlat
=
this
.
lattices
[
jelidx
];
var
jlat
=
this
.
lattices
[
jelidx
];
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
jlat
)){
grassArr
.
push
(
jelidx
);
}
if
(
this
.
eliminatedElements
.
indexOf
(
jelidx
)
==-
1
&&
effectIndexs
.
indexOf
(
jelidx
)
==-
1
){
if
(
this
.
eliminatedElements
.
indexOf
(
jelidx
)
==-
1
&&
effectIndexs
.
indexOf
(
jelidx
)
==-
1
){
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
jlat
)){
grassArr
.
push
(
jelidx
);
}
this
.
eliminatedElements
.
push
(
jelidx
);
this
.
eliminatedElements
.
push
(
jelidx
);
if
(
jlat
.
element
.
type
==
ElementType
.
FISH
){
if
(
jlat
.
element
.
type
==
ElementType
.
FISH
){
jlat
.
element
.
nextFishState
();
jlat
.
element
.
nextFishState
();
...
@@ -4483,10 +4466,11 @@ export default class MainScene extends Scene {
...
@@ -4483,10 +4466,11 @@ export default class MainScene extends Scene {
for
(
var
j1
=
0
;
j1
<
elimitarr
.
length
;
j1
++
){
for
(
var
j1
=
0
;
j1
<
elimitarr
.
length
;
j1
++
){
var
jelidx
=
elimitarr
[
j1
];
var
jelidx
=
elimitarr
[
j1
];
var
jlat
=
this
.
lattices
[
jelidx
];
var
jlat
=
this
.
lattices
[
jelidx
];
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
jlat
)){
grassArr
.
push
(
jelidx
);
}
if
(
this
.
eliminatedElements
.
indexOf
(
jelidx
)
==-
1
&&
effectIndexs
.
indexOf
(
jelidx
)
==-
1
){
if
(
this
.
eliminatedElements
.
indexOf
(
jelidx
)
==-
1
&&
effectIndexs
.
indexOf
(
jelidx
)
==-
1
){
if
(
canturgrass
&&
Tool
.
judgeTurfto
(
jlat
)){
grassArr
.
push
(
jelidx
);
}
this
.
eliminatedElements
.
push
(
jelidx
);
this
.
eliminatedElements
.
push
(
jelidx
);
if
(
jlat
.
element
.
type
==
ElementType
.
FISH
){
if
(
jlat
.
element
.
type
==
ElementType
.
FISH
){
jlat
.
element
.
nextFishState
();
jlat
.
element
.
nextFishState
();
...
@@ -4515,11 +4499,9 @@ export default class MainScene extends Scene {
...
@@ -4515,11 +4499,9 @@ export default class MainScene extends Scene {
break
;
break
;
}
}
if
(
grassArr
.
length
>
0
){
if
(
grassArr
.
length
>
0
){
console
.
log
(
"特效传播草坪"
,
JSON
.
stringify
(
grassArr
));
this
.
changeGroGrass
(
grassArr
);
this
.
changeGroGrass
(
grassArr
);
}
}
if
(
turfCp
.
length
>
0
){
if
(
turfCp
.
length
>
0
){
console
.
log
(
"炮台猩猩草坪"
,
JSON
.
stringify
(
turfCp
))
this
.
changeGroGrassCp
(
turfCp
);
this
.
changeGroGrassCp
(
turfCp
);
}
}
}
}
...
@@ -4569,7 +4551,7 @@ export default class MainScene extends Scene {
...
@@ -4569,7 +4551,7 @@ export default class MainScene extends Scene {
}
}
//如果特效有,消除特效
//如果特效有,消除特效
if
(
effectElements
.
length
)
{
if
(
effectElements
.
length
)
{
console
.
log
(
"结算检测---------------------有需要特效消除"
,
JSON
.
stringify
(
effectElements
));
//
console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements));
Array
.
prototype
.
push
.
apply
(
this
.
eliminatedElements
,
effectElements
);
Array
.
prototype
.
push
.
apply
(
this
.
eliminatedElements
,
effectElements
);
this
.
eliminate
();
this
.
eliminate
();
}
else
{
}
else
{
...
...
egret/src/something/chapters/Chapter28.ts
View file @
87826b84
...
@@ -49,7 +49,7 @@ export const Chapters28: ChapterData[] = [
...
@@ -49,7 +49,7 @@ export const Chapters28: ChapterData[] = [
0
,
91
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
91
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
8
,
1
,
3
,
0
,
0
,
0
],
connectedLats
:
[],
0
,
0
,
0
,
8
,
1
,
3
,
0
,
0
,
0
],
connectedLats
:
[],
...
@@ -61,9 +61,9 @@ export const Chapters28: ChapterData[] = [
...
@@ -61,9 +61,9 @@ export const Chapters28: ChapterData[] = [
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
19
,
19
,
1
,
1
,
1
,
1
,
1
,
4
,
4
,
19
,
19
,
1
,
1
,
1
,
1
,
1
,
4
,
2
,
1
,
1
,
2
,
2
,
2
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
5
,
4
,
5
,
12
,
5
,
4
,
5
,
1
,
1
,
1
,
4
,
1
,
12
,
1
,
4
,
1
,
1
,
1
,
1
,
4
,
4
,
4
,
4
,
4
,
1
,
1
,
1
,
1
,
4
,
4
,
4
,
4
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
],
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
],
baseElements
:
[
baseElements
:
[
...
...
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