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
06e4d8b1
Commit
06e4d8b1
authored
Apr 02, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改签到界面第七天不能连续弹出
parent
dd42a3b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
16 deletions
+54
-16
SignPanel.ts
egret/src/panels/SignPanel.ts
+53
-15
getSignInfo.json
mock/sign/getSignInfo.json
+1
-1
No files found.
egret/src/panels/SignPanel.ts
View file @
06e4d8b1
...
...
@@ -331,6 +331,9 @@ export default class SignPanel extends Panel {
super
.
removeEvents
();
this
[
"closeBtn"
].
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
[
"btn1"
].
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
signToday
,
this
);
this
.
rmMvListener
();
}
movep1
:
egret
.
Point
;
...
...
@@ -653,10 +656,10 @@ export default class SignPanel extends Panel {
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"signxistar"
];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
//
if (movieClips[svgas[i]]){
// //
this.addMvListener(svgas[i]);
//
continue;
//
}
if
(
movieClips
[
svgas
[
i
]]){
this
.
addMvListener
(
svgas
[
i
]);
continue
;
}
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
...
...
@@ -694,9 +697,18 @@ export default class SignPanel extends Panel {
})
}
}
completeCall
:{
signxistar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
}
=
{
signxistar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
};
enterFrameCall
:{
signxistar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
}
=
{
signxistar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
};
addMvListener
(
mvname
){
let
fun
;
movieClips
[
mvname
].
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
if
(
this
.
completeCall
[
mvname
]){
this
.
completeCall
[
mvname
]
=
null
;
}
this
.
completeCall
[
mvname
]
=
function
(
e
)
{
if
(
mvname
==
"signxistar"
){
if
(
this
.
autoClose
){
e
.
target
.
stop
()
...
...
@@ -718,10 +730,13 @@ export default class SignPanel extends Panel {
// movieClips['signxistar'].alpha = 1;
// movieClips['signxistar'].gotoAndPlay(1,1);
// }
},
this
)
}.
bind
(
this
);
movieClips
[
mvname
].
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
completeCall
[
mvname
],
this
)
if
(
mvname
==
"signshine"
){
let
fun1
;
movieClips
[
'signshine'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
fun1
=
function
(
e
){
if
(
this
.
enterFrameCall
[
mvname
]){
this
.
enterFrameCall
[
mvname
]
=
null
;
}
this
.
enterFrameCall
[
mvname
]
=
function
(
e
){
var
curframe
=
movieClips
[
'signshine'
].
currentFrame
;
if
(
curframe
==
20
){
egret
.
Tween
.
get
(
movieClips
[
'signxistar'
])
...
...
@@ -735,10 +750,14 @@ export default class SignPanel extends Panel {
movieClips
[
'signxistar'
].
gotoAndPlay
(
1
,
1
);
},
this
);
}
},
this
);
}.
bind
(
this
);
movieClips
[
'signshine'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
]
,
this
);
}
else
if
(
mvname
==
"signgiftbox"
){
let
fun2
;
movieClips
[
'signgiftbox'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
fun2
=
function
(
e
){
if
(
this
.
enterFrameCall
[
mvname
]){
this
.
enterFrameCall
[
mvname
]
=
null
;
}
this
.
enterFrameCall
[
mvname
]
=
function
(
e
){
var
curframe
=
movieClips
[
'signgiftbox'
].
currentFrame
;
if
(
curframe
==
5
){
// egret.Tween.get(movieClips['signxistar'])
...
...
@@ -760,10 +779,10 @@ export default class SignPanel extends Panel {
this
.
playShineDot
();
this
.
tweenShowGroup
();
}
}
,
this
);
}
.
bind
(
this
);
movieClips
[
'signgiftbox'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
],
this
);
movieClips
[
'signgiftbox'
]
}
// if(mvname=="signxistar"){//开始收
// let fun1;
...
...
@@ -780,4 +799,23 @@ export default class SignPanel extends Panel {
// },this)
// }
}
rmMvListener
(){
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"signxistar"
];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
let
mvname
=
svgas
[
i
];
if
(
movieClips
[
mvname
]
&&
this
.
completeCall
[
mvname
]){
movieClips
[
mvname
].
removeEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
completeCall
[
mvname
],
this
);
}
if
(
mvname
==
"signshine"
){
if
(
movieClips
[
mvname
]
&&
this
.
enterFrameCall
[
mvname
]){
movieClips
[
'signshine'
].
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
]
,
this
);
}
}
else
if
(
mvname
==
"signgiftbox"
){
if
(
movieClips
[
mvname
]
&&
this
.
enterFrameCall
[
mvname
]){
movieClips
[
'signgiftbox'
].
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
]
,
this
);
}
}
}
}
}
\ No newline at end of file
mock/sign/getSignInfo.json
View file @
06e4d8b1
{
"success"
:
true
,
"signInfoVO"
:
{
"continueDay"
:
4
,
"continueDay"
:
5
,
"todaySigned"
:
0
}
}
\ 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