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
ef9b23b9
Commit
ef9b23b9
authored
Apr 28, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
糖果变特效出问题
parent
cb1a1f61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
MainScene.ts
egret/src/mainScene/MainScene.ts
+8
-1
Chapter26.ts
egret/src/something/chapters/Chapter26.ts
+12
-1
Element.ts
egret/src/something/class/Element.ts
+19
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
ef9b23b9
...
...
@@ -1486,7 +1486,7 @@ export default class MainScene extends Scene {
const
ele
:
Element
=
this
.
lattices
[
i
].
element
;
if
(
isCandyEle
)
{
//糖果元素
if
(
baseElement
==
CandyBaseElementType
.
RANDOM
)
{
//如果是随机糖果,目前只有随机糖果
ele
.
resetToCandyView
(
convertBaseElementType
(
ele
.
type
));
//切换成糖果视图
ele
.
resetToCandyView
(
convertBaseElementType
(
ele
.
type
)
,
this
);
//切换成糖果视图
}
else
{
// const baseType = convertCandyBaseElementType(resultBaseElement);
// ele.resetType(baseType);//先重置ele类型
...
...
@@ -5728,4 +5728,11 @@ export default class MainScene extends Scene {
}
}
//新增糖果转特效元素处理
setCandyToEffect
(){
this
.
playAni
(
RecoverName
.
STEP_ANI
,
[
50
,
100
]);
setTimeout
(()
=>
{
this
.
steps
+=
5
;
},
333
)
}
}
\ No newline at end of file
egret/src/something/chapters/Chapter26.ts
View file @
ef9b23b9
...
...
@@ -240,6 +240,17 @@ export const Chapters26: ChapterData[] = [
1
,
1
,
1
,
1
,
11
,
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
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[
{
index
:
3
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
10
,
type
:
null
},
{
index
:
11
,
type
:
null
},
{
index
:
13
,
type
:
null
},
{
index
:
16
,
type
:
null
},
{
index
:
24
,
type
:
null
},
{
index
:
27
,
type
:
null
},
{
index
:
35
,
type
:
null
}
]
}
},
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
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[],
generateLats
:
[
{
index
:
3
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
10
,
type
:
null
},
{
index
:
11
,
type
:
null
},
{
index
:
13
,
type
:
null
},
{
index
:
16
,
type
:
null
},
{
index
:
24
,
type
:
null
},
{
index
:
27
,
type
:
null
},
{
index
:
35
,
type
:
null
}
]
}
},
]
egret/src/something/class/Element.ts
View file @
ef9b23b9
...
...
@@ -222,7 +222,10 @@ export class Element extends eui.Component {
}
private
_candy
:
Candy
;
resetToCandyView
(
baseElement
:
CandyBaseElementType
)
{
resetToCandyView
(
baseElement
:
CandyBaseElementType
,
mainscene
?)
{
if
(
mainscene
){
this
.
mainScene
=
mainscene
;
}
const
res
=
transElementRes
(
baseElement
);
this
.
changeSource
(
"ele"
+
res
+
"_png"
);
...
...
@@ -599,6 +602,10 @@ export class Element extends eui.Component {
if
(
this
.
_fireworks
&&
this
.
_fireworks
.
parent
){
this
.
_fireworks
.
parent
.
removeChild
(
this
.
_fireworks
);
}
if
(
this
.
candy
&&
this
.
candy
.
parent
){
this
.
candy
.
parent
.
removeChild
(
this
.
candy
);
this
.
_candy
=
null
;
}
}
...
...
@@ -754,6 +761,17 @@ export class Element extends eui.Component {
}
set
effectType
(
value
:
EffectType
)
{
//糖果被直接设置成特效元素
if
(
this
.
candy
&&
this
.
candy
.
step
){
this
.
playCandyDieAni
();
this
.
candy
.
visible
=
false
;
egret
.
Tween
.
removeTweens
(
this
.
showImage
);
this
.
showImage
.
scaleX
=
1
;
this
.
showImage
.
scaleY
=
1
;
this
.
showImage
.
alpha
=
1
;
this
.
mainScene
&&
this
.
mainScene
.
setCandyToEffect
();
}
if
(
this
.
monster
)
{
value
=
null
;
}
...
...
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