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
e99b2ca2
Commit
e99b2ca2
authored
Jan 06, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
932e03cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
21 deletions
+42
-21
ele17.png
egret/resource/assets/mainScene/ele17.png
+0
-0
ele19.png
egret/resource/assets/mainScene/ele19.png
+0
-0
Chapter13.ts
egret/src/something/chapters/Chapter13.ts
+3
-14
Candy.ts
egret/src/something/class/Candy.ts
+8
-4
Element.ts
egret/src/something/class/Element.ts
+31
-3
No files found.
egret/resource/assets/mainScene/ele17.png
View replaced file @
932e03cd
View file @
e99b2ca2
5.34 KB
|
W:
|
H:
6.45 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/mainScene/ele19.png
View replaced file @
932e03cd
View file @
e99b2ca2
5.28 KB
|
W:
|
H:
6.44 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/src/something/chapters/Chapter13.ts
View file @
e99b2ca2
...
...
@@ -273,7 +273,7 @@ export const Chapters13: ChapterData[] = [
3
,
0
,
0
,
3
,
3
,
3
,
0
,
0
,
3
],
connectedLats
:
[],
elements
:
[
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
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
...
@@ -285,7 +285,7 @@ export const Chapters13: ChapterData[] = [
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
108
,
109
,
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
,
...
...
@@ -293,18 +293,7 @@ export const Chapters13: ChapterData[] = [
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, 111, 106, 107, 108, 109, 0,
// 0, 0, 0, 0, 0, 0, 0, 110, 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
:
0
,
type
:
null
},
{
index
:
3
,
type
:
null
},
{
index
:
4
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
8
,
type
:
null
},
{
index
:
10
,
type
:
null
},
{
index
:
11
,
type
:
null
},
{
index
:
15
,
type
:
null
},
{
index
:
16
,
type
:
null
}]
}
},
//297
{
baseElementTypes
:
[
0
,
1
,
2
,
4
],
bubbleProbability
:
10
,
stepCount
:
20
,
passTarget
:
{
type
:
1
,
elements
:
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
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
recycles
:
[
72
,
73
,
74
,
75
,
76
,
77
,
78
,
79
,
80
],
generateLats
:
[{
index
:
1
,
type
:
null
},
{
index
:
2
,
type
:
null
},
{
index
:
3
,
type
:
null
},
{
index
:
4
,
type
:
null
},
{
index
:
5
,
type
:
null
},
{
index
:
6
,
type
:
null
},
{
index
:
7
,
type
:
null
}]
}
}
}
]
\ No newline at end of file
egret/src/something/class/Candy.ts
View file @
e99b2ca2
import
{
CandyBaseElementType
}
from
"../enum/ElementType"
;
import
{
Element
}
from
"./Element"
;
export
class
Candy
extends
egret
.
Sprite
{
ele
;
ele
:
Element
;
nextState
():
any
{
return
new
Promise
((
r
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
this
.
_step
--
;
if
(
this
.
_step
<=
0
)
{
this
.
_step
=
0
;
if
(
this
.
_step
<
0
)
{
this
.
_step
=
0
;
}
else
{
if
(
this
.
ele
)
this
.
ele
.
playCandySubAni
();
}
const
result
:
any
=
{
element
:
this
.
ele
...
...
@@ -43,6 +46,7 @@ export class Candy extends egret.Sprite {
this
.
touchEnabled
=
this
.
touchChildren
=
false
;
this
.
_step
=
this
.
MAX_STEP
;
this
.
_nums
=
new
eui
.
BitmapLabel
();
this
.
_nums
.
y
=
2
;
this
.
_nums
.
font
=
'candynums_fnt'
;
this
.
changeText
();
this
.
addChild
(
this
.
_nums
);
...
...
egret/src/something/class/Element.ts
View file @
e99b2ca2
...
...
@@ -23,11 +23,36 @@ export class Element extends eui.Component {
resetToCandyView
(
baseElement
:
CandyBaseElementType
)
{
const
res
=
transElementRes
(
baseElement
);
this
.
changeSource
(
"ele"
+
res
+
"_png"
);
this
.
showImage
.
x
=
0
;
this
.
showImage
.
y
=
0
;
this
.
showImage
.
anchorOffsetX
=
this
.
showImage
.
width
/
2
;
this
.
showImage
.
anchorOffsetY
=
this
.
showImage
.
height
/
2
;
this
.
_candy
=
new
Candy
();
this
.
_candy
.
ele
=
this
;
this
.
_candy
.
baseElement
=
baseElement
;
this
.
addChild
(
this
.
_candy
);
this
.
addCandyStandbyAni
();
}
playCandySubAni
()
{
return
new
Promise
((
r
)
=>
{
egret
.
Tween
.
removeTweens
(
this
.
showImage
);
egret
.
Tween
.
get
(
this
.
showImage
).
to
({
scaleX
:
0
,
scaleY
:
0
},
200
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
500
,
egret
.
Ease
.
backOut
).
call
(()
=>
{
this
.
addCandyStandbyAni
();
r
();
});
});
}
addCandyStandbyAni
()
{
egret
.
Tween
.
removeTweens
(
this
.
showImage
);
egret
.
Tween
.
get
(
this
.
showImage
,
{
loop
:
true
})
.
to
({
scaleX
:
1.1
,
scaleY
:
0.9
},
500
).
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
200
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
).
wait
(
1000
);
}
/**
* 初始类型
*/
...
...
@@ -199,6 +224,9 @@ export class Element extends eui.Component {
*/
reset
(
type
:
ElementType
)
{
this
.
alpha
=
this
.
scaleX
=
this
.
scaleY
=
1
;
this
.
showImage
.
anchorOffsetX
=
0
;
this
.
showImage
.
anchorOffsetY
=
0
;
egret
.
Tween
.
removeTweens
(
this
.
showImage
);
//类型重置,showImage修改
this
.
_type
=
type
;
this
.
changeSource
(
"ele"
+
type
+
"_png"
);
...
...
@@ -238,9 +266,9 @@ export class Element extends eui.Component {
this
.
festivalEle
=
null
;
}
if
(
this
.
_candy
)
{
if
(
this
.
_candy
)
{
this
.
_candy
.
parent
&&
this
.
_candy
.
parent
.
removeChild
(
this
.
_candy
);
this
.
_candy
=
null
;
this
.
_candy
=
null
;
}
}
...
...
@@ -429,5 +457,5 @@ export class Element extends eui.Component {
ele
.
y
=
this
.
y
;
return
ele
}
get
candy
()
{
return
this
.
_candy
}
get
candy
()
{
return
this
.
_candy
}
}
\ No newline at end of file
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