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
8f844f39
Commit
8f844f39
authored
Apr 29, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加651-675关卡
parent
d6ddd7e9
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
429 additions
and
278 deletions
+429
-278
sceneCtrl.ts
egret/libs/new_wx/ctrls/sceneCtrl.ts
+2
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+20
-20
Chapter26.ts
egret/src/something/chapters/Chapter26.ts
+402
-251
WormHole.ts
egret/src/something/class/WormHole.ts
+3
-3
AiControl.ts
egret/src/something/logic/AiControl.ts
+2
-2
No files found.
egret/libs/new_wx/ctrls/sceneCtrl.ts
View file @
8f844f39
...
@@ -57,8 +57,8 @@ export default class SceneCtrl {
...
@@ -57,8 +57,8 @@ export default class SceneCtrl {
this
.
mapscene
=
new
MapScene
(
data
);
this
.
mapscene
=
new
MapScene
(
data
);
if
(
!
window
[
'development'
])
{
if
(
!
window
[
'development'
])
{
const
promise
=
Promise
.
all
([
const
promise
=
Promise
.
all
([
RES
.
getResAsync
(
`
${
'
M
ap'
}
_json`
),
RES
.
getResAsync
(
`
${
'
m
ap'
}
_json`
),
RES
.
getResAsync
(
`
${
'
M
ap'
}
_png`
)]);
RES
.
getResAsync
(
`
${
'
m
ap'
}
_png`
)]);
promise
.
then
(()
=>
{
promise
.
then
(()
=>
{
this
.
showAfterLoadAtlas
(
this
.
mapscene
,
data
,
onComplete
);
this
.
showAfterLoadAtlas
(
this
.
mapscene
,
data
,
onComplete
);
});
});
...
...
egret/src/mainScene/MainScene.ts
View file @
8f844f39
...
@@ -1635,7 +1635,7 @@ export default class MainScene extends Scene {
...
@@ -1635,7 +1635,7 @@ export default class MainScene extends Scene {
}
}
removeEvents
()
{
removeEvents
()
{
console
.
log
(
'mainscene-------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
)
...
@@ -1678,7 +1678,7 @@ export default class MainScene extends Scene {
...
@@ -1678,7 +1678,7 @@ export default class MainScene extends Scene {
this
.
cannoEffect
=
new
Array
();
this
.
cannoEffect
=
new
Array
();
}
}
destroy
()
{
destroy
()
{
console
.
log
(
"mainscene-------------destroy"
);
//
console.log("mainscene-------------destroy");
super
.
destroy
();
super
.
destroy
();
}
}
...
@@ -3148,7 +3148,7 @@ export default class MainScene extends Scene {
...
@@ -3148,7 +3148,7 @@ export default class MainScene extends Scene {
//如果早已通关,正在结算
//如果早已通关,正在结算
if
(
this
.
hasPassed
)
{
if
(
this
.
hasPassed
)
{
console
.
log
(
"结算检测---------------------弹窗检测3"
);
//
console.log("结算检测---------------------弹窗检测3");
//如果原先特效还有,
//如果原先特效还有,
if
(
!
this
.
isCountingTime
)
{
if
(
!
this
.
isCountingTime
)
{
this
.
terminateSteps
();
this
.
terminateSteps
();
...
@@ -3157,7 +3157,7 @@ export default class MainScene extends Scene {
...
@@ -3157,7 +3157,7 @@ export default class MainScene extends Scene {
else
{
else
{
//通关了
//通关了
//提交分数等
//提交分数等
console
.
log
(
"结算检测---------------------弹窗检测4"
);
//
console.log("结算检测---------------------弹窗检测4");
var
json
=
this
.
getSubmitJson
()
var
json
=
this
.
getSubmitJson
()
this
.
submit
(
json
)
this
.
submit
(
json
)
}
}
...
@@ -3202,7 +3202,7 @@ export default class MainScene extends Scene {
...
@@ -3202,7 +3202,7 @@ export default class MainScene extends Scene {
this
.
effectContinuityTimes
=
0
;
this
.
effectContinuityTimes
=
0
;
//判断步数是否为0;
//判断步数是否为0;
if
(
this
.
steps
==
0
)
{
if
(
this
.
steps
==
0
)
{
console
.
log
(
"结算检测---------------------失败弹窗检测1"
);
//
console.log("结算检测---------------------失败弹窗检测1");
//失败弹框
//失败弹框
// playSound(SoundType.fail);
// playSound(SoundType.fail);
var
panelsDatas
=
this
.
returnPanels
(
"failed"
,
{
level
:
this
.
chapter
})
var
panelsDatas
=
this
.
returnPanels
(
"failed"
,
{
level
:
this
.
chapter
})
...
@@ -3470,7 +3470,7 @@ export default class MainScene extends Scene {
...
@@ -3470,7 +3470,7 @@ 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
(
"黑洞上的烟花播放完毕"
);
//
console.log("黑洞上的烟花播放完毕");
this
.
aiMotionCheckDieMap
();
this
.
aiMotionCheckDieMap
();
}
}
}
}
...
@@ -3479,23 +3479,23 @@ export default class MainScene extends Scene {
...
@@ -3479,23 +3479,23 @@ export default class MainScene extends Scene {
* 果冻蔓延和气泡变色需要重新检查死图
* 果冻蔓延和气泡变色需要重新检查死图
*/
*/
async
aiMotionCheckDieMap
()
{
async
aiMotionCheckDieMap
()
{
console
.
log
(
"重置点击验证"
);
//
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
);
//
console.log("虫洞位移检测",this.wormHolePromise.length);
if
(
this
.
wormFireworks
.
length
>
0
){
if
(
this
.
wormFireworks
.
length
>
0
){
return
console
.
error
(
"等待烟花放完"
);
return
//
console.error("等待烟花放完");
}
}
this
.
_checkMtag
.
wormhole
=
false
;
this
.
_checkMtag
.
wormhole
=
false
;
await
Promise
.
all
(
this
.
wormHolePromise
).
then
(()
=>
{
await
Promise
.
all
(
this
.
wormHolePromise
).
then
(()
=>
{
console
.
log
(
"动画完毕"
);
//
console.log("动画完毕");
});
});
console
.
log
(
"开始黑洞转移"
);
//
console.log("开始黑洞转移");
await
doWormHoleAI
(
this
);
await
doWormHoleAI
(
this
);
// console.log("黑洞转移完毕");
// console.log("黑洞转移完毕");
...
@@ -3544,7 +3544,7 @@ export default class MainScene extends Scene {
...
@@ -3544,7 +3544,7 @@ export default class MainScene extends Scene {
showToast
(
"元素已无法消除"
)
showToast
(
"元素已无法消除"
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// playSound(SoundType.fail);
// playSound(SoundType.fail);
console
.
log
(
"结算检测---------------------失败弹窗检测2"
);
//
console.log("结算检测---------------------失败弹窗检测2");
var
panelsDatas
=
this
.
returnPanels
(
"failed"
,
{
level
:
this
.
chapter
})
var
panelsDatas
=
this
.
returnPanels
(
"failed"
,
{
level
:
this
.
chapter
})
PanelCtrl
.
instance
.
showPanels
(
panelsDatas
[
0
],
panelsDatas
[
1
],
()
=>
{
PanelCtrl
.
instance
.
showPanels
(
panelsDatas
[
0
],
panelsDatas
[
1
],
()
=>
{
});
});
...
@@ -3564,7 +3564,7 @@ export default class MainScene extends Scene {
...
@@ -3564,7 +3564,7 @@ export default class MainScene extends Scene {
this
.
gameGuide
.
show
()
this
.
gameGuide
.
show
()
}
}
;
;
console
.
log
(
"重置点击222"
);
//
console.log("重置点击222");
//允许移动
//允许移动
this
.
enableMouseEvt
(
true
);
this
.
enableMouseEvt
(
true
);
//检查是否有红包炸弹弹框;有就弹出;然后置空
//检查是否有红包炸弹弹框;有就弹出;然后置空
...
@@ -4367,7 +4367,7 @@ export default class MainScene extends Scene {
...
@@ -4367,7 +4367,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
{
...
@@ -4376,11 +4376,11 @@ export default class MainScene extends Scene {
...
@@ -4376,11 +4376,11 @@ export default class MainScene extends Scene {
this
.
score
+=
1000
*
this
.
steps
;
this
.
score
+=
1000
*
this
.
steps
;
this
.
steps
=
0
;
this
.
steps
=
0
;
var
json
=
this
.
getSubmitJson
()
var
json
=
this
.
getSubmitJson
()
console
.
log
(
"结算检测---------------------弹窗检测5"
);
//
console.log("结算检测---------------------弹窗检测5");
this
.
submit
(
json
)
this
.
submit
(
json
)
return
return
}
}
console
.
log
(
"结算检测-------------------结算飞星"
);
//
console.log("结算检测-------------------结算飞星");
this
.
isCountingTime
=
true
;
this
.
isCountingTime
=
true
;
let
countAll
=
Math
.
min
(
this
.
steps
,
elements
.
length
);
let
countAll
=
Math
.
min
(
this
.
steps
,
elements
.
length
);
let
count
=
0
;
let
count
=
0
;
...
@@ -4692,7 +4692,7 @@ export default class MainScene extends Scene {
...
@@ -4692,7 +4692,7 @@ export default class MainScene extends Scene {
//动画
//动画
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"冰块pro"
,
lat
.
index
);
//
console.log("冰块pro",lat.index);
this
.
wormHolePromise
.
push
(
pro
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
}
else
if
(
lat
.
block
&&
lat
.
block
.
ice
&&
lat
.
block
.
canIceBroken
&&
lat
.
block
.
ice
.
alpha
!=
0
)
{
//石门(可能带冰) && 石门反转了可以消除了
}
else
if
(
lat
.
block
&&
lat
.
block
.
ice
&&
lat
.
block
.
canIceBroken
&&
lat
.
block
.
ice
.
alpha
!=
0
)
{
//石门(可能带冰) && 石门反转了可以消除了
...
@@ -4710,7 +4710,7 @@ export default class MainScene extends Scene {
...
@@ -4710,7 +4710,7 @@ export default class MainScene extends Scene {
//动画
//动画
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"石门冰块pro"
,
lat
.
index
);
//
console.log("石门冰块pro",lat.index);
this
.
wormHolePromise
.
push
(
pro
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
}
else
if
(
lat
.
sand
)
{
}
else
if
(
lat
.
sand
)
{
...
@@ -4786,7 +4786,7 @@ export default class MainScene extends Scene {
...
@@ -4786,7 +4786,7 @@ export default class MainScene extends Scene {
let
isInworm
=
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
);
let
isInworm
=
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
);
if
(
isInworm
&&
this
.
_checkMtag
.
wormhole
){
if
(
isInworm
&&
this
.
_checkMtag
.
wormhole
){
console
.
error
(
"添加烟花pro"
,
lat
.
index
);
//
console.error("添加烟花pro",lat.index);
// this.wormHolePromise.push(pro);
// this.wormHolePromise.push(pro);
if
(
this
.
wormFireworks
.
indexOf
(
index
)
==-
1
){
if
(
this
.
wormFireworks
.
indexOf
(
index
)
==-
1
){
this
.
wormFireworks
.
push
(
index
);
this
.
wormFireworks
.
push
(
index
);
...
@@ -5250,7 +5250,7 @@ export default class MainScene extends Scene {
...
@@ -5250,7 +5250,7 @@ export default class MainScene extends Scene {
//播放动效
//播放动效
let
pro
=
this
.
playAni
(
RecoverName
.
ROCK_ANI
,
Tool
.
getPositionByIndex
(
index
))
let
pro
=
this
.
playAni
(
RecoverName
.
ROCK_ANI
,
Tool
.
getPositionByIndex
(
index
))
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
if
(
this
.
_checkMtag
.
wormhole
&&
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"石头裂开pro"
,
index
);
//
console.log("石头裂开pro",index);
this
.
wormHolePromise
.
push
(
pro
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
}
}
...
...
egret/src/something/chapters/Chapter26.ts
View file @
8f844f39
This diff is collapsed.
Click to expand it.
egret/src/something/class/WormHole.ts
View file @
8f844f39
...
@@ -27,7 +27,7 @@ export default class WormHole extends egret.Sprite{
...
@@ -27,7 +27,7 @@ export default class WormHole extends egret.Sprite{
}
}
initSvga
(){
initSvga
(){
if
(
wormvideo
){
if
(
wormvideo
){
console
.
log
(
"复用黑洞数据"
);
//
console.log("复用黑洞数据");
this
.
createWormHole
();
this
.
createWormHole
();
}
else
{
}
else
{
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
...
@@ -48,13 +48,13 @@ export default class WormHole extends egret.Sprite{
...
@@ -48,13 +48,13 @@ export default class WormHole extends egret.Sprite{
this
.
addChild
(
this
.
wormHoleClip
);
this
.
addChild
(
this
.
wormHoleClip
);
this
.
wormHoleClip
.
gotoAndStop
(
1
);
this
.
wormHoleClip
.
gotoAndStop
(
1
);
this
.
wormHoleClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
this
.
wormHoleClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
console
.
log
(
"添加黑洞"
,
this
.
wormHoleClip
);
//
console.log("添加黑洞",this.wormHoleClip);
}
}
toFrameAni
(){
toFrameAni
(){
var
curframe
=
this
.
wormHoleClip
.
currentFrame
;
var
curframe
=
this
.
wormHoleClip
.
currentFrame
;
if
(
curframe
==
123
){
if
(
curframe
==
123
){
var
endtime
=
new
Date
().
getTime
();
var
endtime
=
new
Date
().
getTime
();
console
.
log
(
"passtime"
,
endtime
-
this
.
playtime
);
//
console.log("passtime",endtime-this.playtime);
this
.
wormHoleClip
.
gotoAndStop
(
1
);
this
.
wormHoleClip
.
gotoAndStop
(
1
);
}
}
}
}
...
...
egret/src/something/logic/AiControl.ts
View file @
8f844f39
...
@@ -239,7 +239,7 @@ export class AiControl {
...
@@ -239,7 +239,7 @@ export class AiControl {
if
(
!
lattice
||
!
lattice
.
element
||
lattice
.
element
.
type
!=
ElementType
.
JELLY
||
(
lattice
.
block
&&
lattice
.
block
.
isLock
()))
continue
if
(
!
lattice
||
!
lattice
.
element
||
lattice
.
element
.
type
!=
ElementType
.
JELLY
||
(
lattice
.
block
&&
lattice
.
block
.
isLock
()))
continue
indexs
.
push
(
i
);
indexs
.
push
(
i
);
}
}
console
.
log
(
'没有被锁的果冻数量'
,
indexs
.
length
,
'被锁果冻数量'
,
blocked
.
length
)
//
console.log('没有被锁的果冻数量', indexs.length, '被锁果冻数量', blocked.length)
//如果没有果冻,直接回调
//如果没有果冻,直接回调
if
(
!
indexs
.
length
&&
blocked
.
length
==
0
)
{
if
(
!
indexs
.
length
&&
blocked
.
length
==
0
)
{
//标记为无果冻
//标记为无果冻
...
@@ -379,7 +379,7 @@ export class AiControl {
...
@@ -379,7 +379,7 @@ export class AiControl {
})
})
})
})
if
(
thisObj
.
_checkMtag
.
wormhole
){
if
(
thisObj
.
_checkMtag
.
wormhole
){
console
.
log
(
"蛋壳pro"
,
activeEggIndex
);
//
console.log("蛋壳pro",activeEggIndex);
thisObj
.
wormHolePromise
.
push
(
pro
);
thisObj
.
wormHolePromise
.
push
(
pro
);
}
}
...
...
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