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
d8cb8ff9
Commit
d8cb8ff9
authored
Apr 27, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改烟花pro添加重复导致all释放不了引起的页面无法点击问题
parent
e221eb03
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
19 deletions
+50
-19
MainScene.ts
egret/src/mainScene/MainScene.ts
+28
-4
Chapter26.ts
egret/src/something/chapters/Chapter26.ts
+13
-12
getChapter.ts
egret/src/something/chapters/getChapter.ts
+1
-1
Element.ts
egret/src/something/class/Element.ts
+4
-2
Lattice.ts
egret/src/something/class/Lattice.ts
+3
-0
AiControl.ts
egret/src/something/logic/AiControl.ts
+1
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
d8cb8ff9
...
...
@@ -376,6 +376,8 @@ export default class MainScene extends Scene {
//黑洞转移需在所有动画播放完毕后进行
wormHolePromise
:
Promise
<
any
>
[];
//处理烟花的
wormFireworks
:
any
;
//todo
targetContainer
:
egret
.
DisplayObjectContainer
;
chapterTxt
:
ChapterNum
;
...
...
@@ -1869,6 +1871,7 @@ export default class MainScene extends Scene {
}
if
(
s
)
{
this
.
wormHolePromise
=
new
Array
();
this
.
wormFireworks
=
{};
//成功的
switch
(
prop
)
{
case
PropType
.
BOOM
:
...
...
@@ -2058,6 +2061,7 @@ export default class MainScene extends Scene {
mouseDownE
(
e
:
egret
.
TextEvent
)
{
this
.
wormHolePromise
=
new
Array
();
this
.
wormFireworks
=
{};
// if (!this.enableTouch) return
this
.
initOneElmtTag
();
var
self
=
this
;
...
...
@@ -2085,6 +2089,8 @@ export default class MainScene extends Scene {
mouseMoveE
(
e
)
{
this
.
wormHolePromise
=
new
Array
();
this
.
wormFireworks
=
{};
this
.
initOneElmtTag
();
if
(
this
.
SELECTED
&&
e
.
target
.
parent
instanceof
Element
)
{
if
(
!
Tool
.
judgeChosen
(
e
.
target
.
parent
))
return
...
...
@@ -3446,10 +3452,23 @@ export default class MainScene extends Scene {
this
.
_checkMtag
.
wormhole
=
false
;
let
wormholes
=
this
.
chapterData
.
map
.
WORMHOLE
;
if
(
wormholes
&&
wormholes
.
length
>
0
){
console
.
log
(
"虫洞位移"
)
console
.
log
(
"虫洞位移"
,
this
.
wormHolePromise
.
length
);
await
Promise
.
all
(
this
.
wormHolePromise
).
then
(()
=>
{
console
.
log
(
"
虫洞可以开始移动
"
);
console
.
log
(
"
动画完毕
"
);
});
let
fireworkspro
=
new
Array
();
for
(
let
firekey
in
this
.
wormFireworks
){
let
ifirepro
=
this
.
wormFireworks
[
firekey
];
fireworkspro
.
push
(
ifirepro
);
}
if
(
fireworkspro
.
length
>
0
){
await
Promise
.
all
(
fireworkspro
).
then
(()
=>
{
console
.
log
(
"烟花完毕,虫洞可以开始移动"
);
})
}
await
doWormHoleAI
(
this
);
// console.log("黑洞转移完毕");
...
...
@@ -4634,6 +4653,7 @@ export default class MainScene extends Scene {
//动画
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
if
(
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"冰块pro"
,
lat
.
index
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
else
if
(
lat
.
block
&&
lat
.
block
.
ice
&&
lat
.
block
.
canIceBroken
&&
lat
.
block
.
ice
.
alpha
!=
0
)
{
//石门(可能带冰) && 石门反转了可以消除了
...
...
@@ -4651,6 +4671,7 @@ export default class MainScene extends Scene {
//动画
let
pro
=
this
.
playAni
(
RecoverName
.
ICE_ANI
,
p
);
if
(
Tool
.
judgeInWormHole
(
lat
.
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"石门冰块pro"
,
lat
.
index
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
else
if
(
lat
.
sand
)
{
...
...
@@ -4726,8 +4747,10 @@ export default class MainScene extends Scene {
let
isInworm
=
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
);
if
(
isInworm
){
console
.
error
(
"添加烟花pro"
);
this
.
wormHolePromise
.
push
(
pro
);
console
.
error
(
"添加烟花pro"
,
lat
.
index
);
// this.wormHolePromise.push(pro);
this
.
wormFireworks
[
index
]
=
pro
;
}
}
this
.
goElementTarget
(
type
,
[
ele
.
x
,
ele
.
y
]);
...
...
@@ -5187,6 +5210,7 @@ export default class MainScene extends Scene {
//播放动效
let
pro
=
this
.
playAni
(
RecoverName
.
ROCK_ANI
,
Tool
.
getPositionByIndex
(
index
))
if
(
Tool
.
judgeInWormHole
(
index
,
this
.
chapterData
.
map
.
WORMHOLE
)){
console
.
log
(
"石头裂开pro"
,
index
);
this
.
wormHolePromise
.
push
(
pro
);
}
}
...
...
egret/src/something/chapters/Chapter26.ts
View file @
d8cb8ff9
...
...
@@ -191,25 +191,26 @@ export const Chapters26: ChapterData[] = [
{
baseElementTypes
:
[
1
,
2
,
0
,
4
],
bubbleProbability
:
0
,
stepCount
:
27
,
passTarget
:
{
type
:
1
,
elements
:
[
{
type
:
22
,
count
:
25
},
{
type
:
24
,
count
:
25
},
{
type
:
26
,
count
:
25
}
]
},
starScores
:
[
15000
,
20000
,
25000
],
map
:
{
lattices
:
[
4
,
4
,
1
,
41
,
41
,
41
,
1
,
4
,
4
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,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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
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
egret/src/something/chapters/getChapter.ts
View file @
d8cb8ff9
...
...
@@ -78,7 +78,7 @@ chapters.forEach((chapter,index) => {
export
function
getChapterData
(
index
:
number
):
ChapterData
{
//没有数据就返回第一关数据
// return chapters[626];
return
chapters
[
index
]
||
chapters
[
655
];
return
chapters
[
index
]
||
chapters
[
1
];
}
var
a
=
{
...
...
egret/src/something/class/Element.ts
View file @
d8cb8ff9
...
...
@@ -82,12 +82,14 @@ export class Element extends eui.Component {
private
_fireworksTimer
=
0
;
get
canFire
()
{
const
t
=
new
Date
().
getTime
();
// console.log("烟花发射检测",t - this._fireworksTimer > 2 * 1000,t,this._fireworksTimer);
return
t
-
this
.
_fireworksTimer
>
2
*
1000
;
}
fire
(
type
:
ElementType
)
{
// zi hong huang lan lv
let
pro
;
this
.
_fireworksTimer
=
new
Date
().
getTime
();
// console.log("重设发射时间",this._fireworksTimer);
if
(
type
==
ElementType
.
FIREWORKS_RABBIT
)
//rabbit 紫
pro
=
this
.
toFireworksAction
(
1
,
90
);
else
if
(
type
==
ElementType
.
FIREWORKS_PIG
)
//pig 粉
...
...
@@ -126,7 +128,7 @@ export class Element extends eui.Component {
if
(
this
.
_fireworks
.
currentFrame
==
end
)
{
//向上吹
this
.
_fireworks
.
gotoAndStop
(
start
);
this
.
_fireworks
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
cb
,
this
);
console
.
error
(
"释放烟花pro"
);
console
.
error
(
"释放烟花pro"
,
this
.
index
);
resolve
();
}
};
...
...
egret/src/something/class/Lattice.ts
View file @
d8cb8ff9
...
...
@@ -142,6 +142,9 @@ export class Lattice {
}
if
(
elecf
.
eledata
[
"type"
]
||
elecf
.
eledata
[
"type"
]
==
ElementType
.
RABBIT
){
this
.
element
=
elecf
.
ele
;
if
(
elecf
.
eledata
[
"type"
]
==
ElementType
.
FIREWORKS_SHOOTER
){
// console.log("设置烟花元素",this.index,this.element.index)
}
// console.log("设置元素",this.index,this.element.index)
}
else
{
// console.log("没设置元素",this.index);
...
...
egret/src/something/logic/AiControl.ts
View file @
d8cb8ff9
...
...
@@ -378,6 +378,7 @@ export class AiControl {
resolve
();
})
})
console
.
log
(
"蛋壳pro"
,
activeEggIndex
);
thisObj
.
wormHolePromise
.
push
(
pro
);
if
(
++
count
==
countAll
)
{
...
...
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