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
277d693d
Commit
277d693d
authored
Nov 08, 2019
by
wjf
Browse files
Options
Browse Files
Download
Plain Diff
l
parents
498edfca
9f8160d0
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
RedBombAlertPanel.ts
egret/src/panels/RedBombAlertPanel.ts
+28
-12
No files found.
egret/resource/TextureMerger/main2.tmproject
View file @
277d693d
This diff is collapsed.
Click to expand it.
egret/src/panels/RedBombAlertPanel.ts
View file @
277d693d
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"
;
<<<<<<<
HEAD
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
=======
>>>>>>>
9
f8160d0a4c64b32d674e876fa7c9c5680a3de02
export
default
class
RedBombAlertPanel
extends
Panel
{
export
default
class
RedBombAlertPanel
extends
Panel
{
async
start
(
data
)
{
async
start
(
data
)
{
...
@@ -15,35 +15,51 @@ export default class RedBombAlertPanel extends Panel {
...
@@ -15,35 +15,51 @@ 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
);
<<<<<<<
HEAD
const
data
=
DataManager
.
ins
.
getData
(
'hc_redBombAward'
).
data
;
const
data
=
DataManager
.
ins
.
getData
(
'hc_redBombAward'
).
data
;
if
(
data
){
if
(
data
){
this
.
playPrizeAni
();
this
.
playPrizeAni
();
}
else
{
}
else
{
this
.
playNoPrizeAni
();
this
.
playNoPrizeAni
();
}
}
=======
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
).
call
(()
=>
{
this
.
removeChild
(
this
[
'group'
]);
});
// this.playNoPrizeAni();
this
.
playPrizeAni
();
>>>>>>>
9
f8160d0a4c64b32d674e876fa7c9c5680a3de02
},
this
);
},
this
);
});
});
}
}
playNoPrizeAni
(){
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
()
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_noprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
//去掉文案
//去掉文案
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
egret
.
Tween
.
get
(
this
[
'group'
]).
to
({
alpha
:
0
},
300
);
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
);
});
});
}
}
...
...
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