Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
185def7c
Commit
185def7c
authored
Nov 12, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6b1086bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
StartSceneBase.ts
egret/libs/new_wx/components/StartSceneBase.ts
+8
-4
panelCtrl.ts
egret/libs/new_wx/ctrls/panelCtrl.ts
+4
-3
No files found.
egret/libs/new_wx/components/StartSceneBase.ts
View file @
185def7c
...
...
@@ -56,13 +56,16 @@ export default class StartSceneBase extends Scene {
btns
.
forEach
(
btn
=>
btn
.
alpha
=
0
)
for
(
const
item
of
[
'e1'
,
'e2'
,
'e3'
,
'e4'
])
{
egret
.
Tween
.
get
(
this
[
item
]).
set
({
scaleX
:
0
,
scaleY
:
0
}).
wait
(
Math
.
random
()
*
300
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
300
+
Math
.
random
()
*
200
,
egret
.
Ease
.
getBackOut
(
2
));
.
to
({
scaleX
:
1
,
scaleY
:
1
},
300
+
Math
.
random
()
*
200
,
egret
.
Ease
.
getBackOut
(
2
)).
call
(()
=>
{
const
y
=
this
[
item
].
y
+
Math
.
random
()
*
100
-
50
;
egret
.
Tween
.
get
(
this
[
item
],
{
loop
:
true
}).
to
({
y
:
y
},
3000
).
to
({
y
:
this
[
item
].
y
},
3000
);
});
}
egret
.
Tween
.
get
(
this
[
'logo'
]).
set
({
alpha
:
0
,
scaleX
:
0
,
scaleY
:
0
})
.
wait
(
300
).
to
({
alpha
:
1
,
scaleX
:
1
,
scaleY
:
1
},
300
,
egret
.
Ease
.
backOut
);
await
wait
(
400
);
egret
.
Tween
.
get
(
this
.
startBtn
).
to
({
horizontalCenter
:
0
},
4
00
,
egret
.
Ease
.
backOut
);
egret
.
Tween
.
get
(
this
.
countTxt
).
wait
(
4
00
).
to
({
horizontalCenter
:
0
},
300
,
egret
.
Ease
.
backOut
);
egret
.
Tween
.
get
(
this
.
startBtn
).
to
({
horizontalCenter
:
0
},
3
00
,
egret
.
Ease
.
backOut
);
egret
.
Tween
.
get
(
this
.
countTxt
).
wait
(
1
00
).
to
({
horizontalCenter
:
0
},
300
,
egret
.
Ease
.
backOut
);
btns
.
forEach
(
btn
=>
{
egret
.
Tween
.
get
(
btn
).
to
({
alpha
:
1
},
700
,
egret
.
Ease
.
backOut
);
});
...
...
@@ -73,7 +76,6 @@ export default class StartSceneBase extends Scene {
.
to
({
scaleY
:
1
,
scaleX
:
1
},
1000
)
.
to
({
scaleX
:
1.1
,
scaleY
:
0.9
},
1000
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
1000
);
}
private
updateGetInfoView
()
{
...
...
@@ -153,9 +155,11 @@ export default class StartSceneBase extends Scene {
});
await
wait
(
300
);
for
(
const
item
of
[
'e1'
,
'e2'
,
'e3'
,
'e4'
])
{
egret
.
Tween
.
removeTweens
(
item
);
egret
.
Tween
.
get
(
this
[
item
]).
to
({
scaleX
:
0
,
scaleY
:
0
},
300
,
egret
.
Ease
.
backIn
);
}
await
wait
(
300
);
egret
.
Tween
.
removeAllTweens
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
PLAY_SCENE
);
}
private
stopTimer
()
{
...
...
egret/libs/new_wx/ctrls/panelCtrl.ts
View file @
185def7c
...
...
@@ -36,7 +36,7 @@ export default class PanelCtrl {
this
.
_current
=
panel
;
panel
.
start
(
data
);
this
.
add
(
panel
);
egret
.
Tween
.
get
(
panel
).
set
({
y
:
-
200
}).
to
({
y
:
0
},
500
,
egret
.
Ease
.
getBackOut
(
2
)
);
egret
.
Tween
.
get
(
panel
).
set
({
y
:
-
200
}).
to
({
y
:
0
},
300
,
egret
.
Ease
.
cubicOut
);
}
addMask
()
{
...
...
@@ -50,9 +50,10 @@ export default class PanelCtrl {
this
.
_mask
.
alpha
=
1
;
this
.
_parent
.
addChild
(
this
.
_mask
);
}
removeMask
()
{
if
(
this
.
_mask
)
{
egret
.
Tween
.
get
(
this
.
_mask
).
to
({
alpha
:
0
},
200
).
call
(
egret
.
Tween
.
get
(
this
.
_mask
).
to
({
alpha
:
0
},
300
,
egret
.
Ease
.
cubicIn
).
call
(
()
=>
this
.
_parent
.
removeChild
(
this
.
_mask
),
this
);
}
}
...
...
@@ -64,7 +65,7 @@ export default class PanelCtrl {
private
remove
(
panel
:
Panel
)
{
const
tw
=
egret
.
Tween
.
get
(
panel
);
tw
.
to
({
y
:
1624
},
400
,
egret
.
Ease
.
getBackIn
(
2
)
)
tw
.
to
({
y
:
panel
.
stage
.
stageHeight
},
300
,
egret
.
Ease
.
cubicIn
)
.
call
(()
=>
{
this
.
_parent
.
removeChild
(
panel
);
this
.
removeMask
();
...
...
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