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
744259a2
Commit
744259a2
authored
Nov 08, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5734288e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
RedBombAlertPanel.ts
egret/src/panels/RedBombAlertPanel.ts
+22
-14
No files found.
egret/src/panels/RedBombAlertPanel.ts
View file @
744259a2
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
createEffect1MovieClip
}
from
"../effect/createEffect1"
;
import
RedBombRule
from
"./RedBombRule"
;
import
{
getRedBombTimes
}
from
"../getRedBombAward"
;
import
{
getRedBombTimes
}
from
"../getRedBombAward"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
export
default
class
RedBombAlertPanel
extends
Panel
{
export
default
class
RedBombAlertPanel
extends
Panel
{
async
start
(
data
)
{
async
start
(
data
)
{
...
@@ -14,28 +10,40 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -14,28 +10,40 @@ export default class RedBombAlertPanel extends Panel {
const
times
=
getRedBombTimes
();
const
times
=
getRedBombTimes
();
this
[
'tips'
].
text
=
`今日还有
${
times
}
个红包在其他关卡等你哦~`
;
this
[
'tips'
].
text
=
`今日还有
${
times
}
个红包在其他关卡等你哦~`
;
if
(
times
<=
0
)
{
if
(
times
<=
0
)
{
this
[
'tips'
].
text
=
`当日红包任务达成,明日再来~`
;
this
[
'tips'
].
text
=
`当日红包任务达成,明日再来~`
;
}
}
this
[
'group'
].
alpha
=
0
;
this
[
'group'
].
alpha
=
0
;
egret
.
Tween
.
get
(
this
[
'group'
]).
wait
(
1500
).
to
({
alpha
:
1
},
300
);
egret
.
Tween
.
get
(
this
[
'group'
]).
wait
(
1500
).
to
({
alpha
:
1
},
300
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb.svga'
).
then
(
async
(
mv
:
any
)
=>
{
this
.
addChild
(
mv
);
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
mv
.
stop
();
this
.
removeChild
(
mv
);
this
.
removeChild
(
mv
);
this
.
playNoPrizeAni
();
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
).
call
(()
=>
{
this
.
removeChild
(
this
[
'group'
]);
});
// this.playNoPrizeAni();
this
.
playPrizeAni
();
},
this
);
},
this
);
});
});
}
playPrizeAni
()
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_prize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
this
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
this
.
hidePanel
()},
this
);
},
this
);
});
}
}
playNoPrizeAni
()
{
playNoPrizeAni
(){
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
this
.
addChild
(
mv
);
this
.
addChild
(
mv
);
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
mv
.
stop
();
mv
.
stop
();
this
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
this
.
hidePanel
()},
this
);
},
this
);
},
this
);
});
});
}
}
...
@@ -46,11 +54,11 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -46,11 +54,11 @@ export default class RedBombAlertPanel extends Panel {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
// this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
// this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
}
}
onTapInvite
()
{
onTapInvite
()
{
}
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
...
...
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