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
60657823
Commit
60657823
authored
Apr 07, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整签到特效
parent
59a842c5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
61 deletions
+104
-61
lightdi.png
egret/resource/assets/sign/lightdi.png
+0
-0
signfastar.svga
egret/resource/assets/svgas/signfastar.svga
+0
-0
signxistar.svga
egret/resource/assets/svgas/signxistar.svga
+0
-0
default.res.json
egret/resource/default.res.json
+7
-2
SignSkin.exml
egret/resource/skins/SignSkin.exml
+3
-1
SignPanel.ts
egret/src/panels/SignPanel.ts
+94
-58
No files found.
egret/resource/assets/sign/lightdi.png
0 → 100644
View file @
60657823
78.8 KB
egret/resource/assets/svgas/signfastar.svga
0 → 100644
View file @
60657823
File added
egret/resource/assets/svgas/signxistar.svga
View file @
60657823
No preview for this file type
egret/resource/default.res.json
View file @
60657823
...
...
@@ -73,7 +73,7 @@
"name"
:
"exchange"
},
{
"keys"
:
"signitem_png,signicon6_png,signicon5_png,signicon4_png,signicon3_png,signicon2_png,signicon_blood_png,signbtn4_png,signbtn3_png,signbtn2_png,signbtn1_png,signbg_png,sign_quan88_png,sign_quan8_png,sign_quan58_png,sign_quan38_png,sign_quan28_png,sign_quan16_png,sign_quan15_png,sign_quan12_png,sign_line2_png,sign_line_png,sign_light_png,sign_icon1_png,sign_quan10_png,sign_quan23_png,sign_quan36_png,sign_quan25_png,sign_quan35_png,sign_quan30_png,sign_mask_png,signitemno_png,signitemyes_png,unsignbtn_png,virprizebg_png"
,
"keys"
:
"signitem_png,signicon6_png,signicon5_png,signicon4_png,signicon3_png,signicon2_png,signicon_blood_png,signbtn4_png,signbtn3_png,signbtn2_png,signbtn1_png,signbg_png,sign_quan88_png,sign_quan8_png,sign_quan58_png,sign_quan38_png,sign_quan28_png,sign_quan16_png,sign_quan15_png,sign_quan12_png,sign_line2_png,sign_line_png,sign_light_png,sign_icon1_png,sign_quan10_png,sign_quan23_png,sign_quan36_png,sign_quan25_png,sign_quan35_png,sign_quan30_png,sign_mask_png,signitemno_png,signitemyes_png,unsignbtn_png,virprizebg_png
,lightdi_png
"
,
"name"
:
"sign"
},
{
...
...
@@ -241,7 +241,7 @@
"name"
:
"helpGroup"
},
{
"keys"
:
"virprizebg_png"
,
"keys"
:
"virprizebg_png
,lightdi_png
"
,
"name"
:
"preload"
}
],
...
...
@@ -5391,6 +5391,11 @@
"url"
:
"assets/sign/virprizebg.png"
,
"type"
:
"image"
,
"name"
:
"virprizebg_png"
},
{
"url"
:
"assets/sign/lightdi.png"
,
"type"
:
"image"
,
"name"
:
"lightdi_png"
}
]
}
\ No newline at end of file
egret/resource/skins/SignSkin.exml
View file @
60657823
...
...
@@ -38,7 +38,9 @@
</e:Button>
<e:Group
id=
"prizegroup"
width=
"750"
height=
"1206"
x=
"0"
y=
"0"
>
<e:Rect
id=
"mask1"
fillAlpha=
"0.8"
x=
"0"
y=
"0"
scaleX=
"1"
scaleY=
"1"
width=
"750"
height=
"1206"
/>
<e:Group
id=
"lightbot"
width=
"750"
height=
"1206"
x=
"0"
y=
"0"
/>
<e:Group
id=
"lightbot"
width=
"750"
height=
"1206"
x=
"0"
y=
"0"
>
<e:Image
source=
"lightdi_png"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"0"
y=
"293"
/>
</e:Group>
<e:Group
id=
"giftbox"
width=
"750"
height=
"1206"
/>
<e:Group
id=
"contmid"
width=
"750"
height=
"1206"
anchorOffsetX=
"375"
x=
"375"
anchorOffsetY=
"603"
y=
"603"
>
<e:Image
id=
"prizeimg"
scaleX=
"2"
scaleY=
"2"
y=
"537"
source=
""
horizontalCenter=
"0"
/>
...
...
egret/src/panels/SignPanel.ts
View file @
60657823
...
...
@@ -110,7 +110,7 @@ export default class SignPanel extends Panel {
const
list
:
any
[]
=
[{},
{},
{},
{},
{},
{},
{}];
console
.
log
(
"签到数据"
,
configs
);
//
console.log("签到数据",configs);
var
btnv
:
boolean
=
false
;
list
.
forEach
((
ele
,
index
)
=>
{
ele
.
index
=
index
;
...
...
@@ -130,7 +130,7 @@ export default class SignPanel extends Panel {
this
.
signidx
=
index
;
btnv
=
true
;
}
console
.
log
(
"今日签到数据"
,
index
,
this
.
signidx
);
//
console.log("今日签到数据",index,this.signidx);
this
.
todayidx
=
index
;
}
else
if
(
index
==
tomorrowIndex
)
{
ele
.
btn
=
3
;
...
...
@@ -268,8 +268,8 @@ export default class SignPanel extends Panel {
this
[
"btn2"
].
visible
=
false
;
this
.
tweenGroup
(
this
[
'contmid'
],
"close"
,
function
(){
this
[
"prizegroup"
].
visible
=
false
;
if
(
movieClips
[
"sign
xi
star"
].
parent
){
movieClips
[
"sign
xistar"
].
parent
.
removeChild
(
movieClips
[
"signxi
star"
]);
if
(
movieClips
[
"sign
fa
star"
].
parent
){
movieClips
[
"sign
fastar"
].
parent
.
removeChild
(
movieClips
[
"signfa
star"
]);
}
//签到完毕
this
.
changeSignToday
();
...
...
@@ -363,7 +363,7 @@ export default class SignPanel extends Panel {
var
itemid
=
customInfo
.
itemId
;
var
propType
=
-
1
;
console
.
log
(
"签到完成,今日奖励"
,
customInfo
);
//
console.log("签到完成,今日奖励",customInfo);
//奖品类型,none无奖励, object实物,
// virtual虚拟商品,coupon券,
// 道具prop,元宝coin,体力times,
...
...
@@ -383,7 +383,7 @@ export default class SignPanel extends Panel {
// this['prizeimg2'].visible = true;
// this['prizeimg2'].source = `http://yun.duiba.com.cn/db_games/${window['imgver']}/${customInfo.itemId}.png`;
console
.
log
(
"未处理图片"
,
`http://yun.duiba.com.cn/db_games/
${
window
[
'imgver'
]}
/
${
customInfo
.
itemId
}
.png`
);
//
console.log("未处理图片",`http://yun.duiba.com.cn/db_games/${window['imgver']}/${customInfo.itemId}.png`);
}
}
this
[
'nums'
].
text
=
'x'
+
prizeCount
;
...
...
@@ -419,19 +419,18 @@ export default class SignPanel extends Panel {
//圆点炸开动画,1-44
//吸星动画底,1-121
//闪烁星星,1-84
if
(
movieClips
[
'signxistar'
]){
//必放底
this
[
'lightbot'
].
addChild
(
movieClips
[
'signxistar'
]);
// movieClips['signxistar'].gotoAndPlay(1,1);
movieClips
[
'signxistar'
].
gotoAndStop
(
1
);
movieClips
[
'signxistar'
].
alpha
=
0
;
}
this
[
"lightbot"
].
alpha
=
1
;
if
(
this
.
showsxbtn
||!
this
[
'prizeimg'
].
visible
){
//手动关闭
this
.
autoClose
=
false
;
this
[
'contmid'
].
visible
=
false
;
//礼盒动画播放完毕,弹出奖励,奖励弹出完毕弹出收下按钮
if
(
this
.
showsxbtn
){
//是第七天并且奖励是礼盒
if
(
movieClips
[
'signxistar'
]){
//必放底///现改为仅礼盒有
this
[
'lightbot'
].
addChild
(
movieClips
[
'signxistar'
]);
movieClips
[
'signxistar'
].
gotoAndStop
(
1
);
this
[
"lightbot"
].
alpha
=
0
;
}
this
[
'giftbox'
].
visible
=
true
;
this
[
'giftbox'
].
alpha
=
1
;
if
(
movieClips
[
'signgiftbox'
]){
...
...
@@ -471,7 +470,13 @@ export default class SignPanel extends Panel {
this
.
itemEffect
(
"shake"
);
this
.
playShineDot
();
//调整
egret
.
Tween
.
get
(
this
[
"lightbot"
]).
set
({
alpha
:
0.3
})
.
to
({
alpha
:
1
,
},
150
)
return
;
await
wait
(
1000
);
this
[
"prizegroup"
].
visible
=
false
;
...
...
@@ -665,7 +670,7 @@ export default class SignPanel extends Panel {
initSvgas
()
{
var
resPath
=
getResPath
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"signxistar"
];
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"sign
fastar"
,
"sign
xistar"
];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
if
(
movieClips
[
svgas
[
i
]]){
this
.
addMvListener
(
svgas
[
i
]);
...
...
@@ -684,9 +689,13 @@ export default class SignPanel extends Panel {
var
mvwidth
:
number
;
var
mvheight
:
number
;
if
(
mvname
==
"signxistar"
){
//底图
mvwidth
=
761
;
if
(
mvname
==
"signxistar"
){
mvheight
=
625
;
mv
.
y
=
(
boxheight
-
mvheight
)
/
2
;
}
else
if
(
mvname
==
"signfastar"
){
//底图
mvwidth
=
750
;
mvheight
=
1554
;
mv
.
x
=
(
boxwidth
-
mvwidth
)
/
2
;
mv
.
y
=
(
boxheight
-
mvheight
)
/
2
;
}
else
if
(
mvname
==
"signshine"
){
...
...
@@ -698,7 +707,7 @@ export default class SignPanel extends Panel {
mvheight
=
210
;
mv
.
y
=
-
mvheight
;
}
else
if
(
mvname
==
"signgiftbox"
){
mv
.
y
=
120
;
}
movieClips
[
svgas
[
i
]]
=
mv
;
...
...
@@ -709,27 +718,27 @@ export default class SignPanel extends Panel {
}
}
completeCall
:{
sign
xistar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
}
=
{
sign
xistar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
completeCall
:{
sign
fastar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
,
signxistar
:
Function
}
=
{
sign
fastar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
,
signxistar
:
null
};
enterFrameCall
:{
sign
xistar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
}
=
{
sign
xistar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
enterFrameCall
:{
sign
fastar
:
Function
,
signshine
:
Function
,
signsandot
:
Function
,
signgiftbox
:
Function
,
signxistar
:
Function
}
=
{
sign
fastar
:
null
,
signshine
:
null
,
signsandot
:
null
,
signgiftbox
:
null
,
signxistar
:
null
};
addMvListener
(
mvname
){
if
(
this
.
completeCall
[
mvname
]){
this
.
completeCall
[
mvname
]
=
null
;
}
this
.
completeCall
[
mvname
]
=
function
(
e
)
{
if
(
mvname
==
"sign
xi
star"
){
if
(
mvname
==
"sign
fa
star"
){
if
(
this
.
autoClose
){
e
.
target
.
stop
()
if
(
e
.
target
.
parent
)
{
e
.
target
.
parent
.
removeChild
(
e
.
target
)
}
this
[
"prizegroup"
].
visible
=
false
;
egret
.
Tween
.
get
(
this
).
to
({
factor
:
1
},
500
).
call
(
this
.
moveOver
,
this
);
//
this["prizegroup"].visible = false;
//
egret.Tween.get(this).to({factor: 1}, 500).call(this.moveOver, this);
}
else
{
// movieClips["sign
xi
star"].gotoAndStop(120);
// movieClips["sign
fa
star"].gotoAndStop(120);
}
}
else
{
e
.
target
.
stop
()
...
...
@@ -737,10 +746,12 @@ export default class SignPanel extends Panel {
e
.
target
.
parent
.
removeChild
(
e
.
target
)
}
}
// if(mvname=="signshine"){
// movieClips['signxistar'].alpha = 1;
// movieClips['signxistar'].gotoAndPlay(1,1);
// }
if
(
mvname
==
"signshine"
){
if
(
this
.
autoClose
){
this
[
"prizegroup"
].
visible
=
false
;
egret
.
Tween
.
get
(
this
).
to
({
factor
:
1
},
500
).
call
(
this
.
moveOver
,
this
);
}
}
}.
bind
(
this
);
movieClips
[
mvname
].
addEventListener
(
egret
.
Event
.
COMPLETE
,
this
.
completeCall
[
mvname
],
this
)
if
(
mvname
==
"signshine"
){
...
...
@@ -749,18 +760,18 @@ export default class SignPanel extends Panel {
}
this
.
enterFrameCall
[
mvname
]
=
function
(
e
){
var
curframe
=
movieClips
[
'signshine'
].
currentFrame
;
if
(
curframe
==
20
){
egret
.
Tween
.
get
(
movieClips
[
'signxi
star'
])
.
set
({
alpha
:
0
})
.
to
({
alpha
:
1
,
},
200
)
.
call
(()
=>
{
movieClips
[
'signxi
star'
].
gotoAndPlay
(
1
,
1
);
},
this
);
}
//
if(curframe==20){
// egret.Tween.get(movieClips['signfa
star'])
//
.set({
//
alpha:0
//
})
//
.to({
//
alpha:1,
//
},200)
//
.call(()=>{
// movieClips['signfa
star'].gotoAndPlay(1,1);
//
},this);
//
}
}.
bind
(
this
);
movieClips
[
'signshine'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
]
,
this
);
...
...
@@ -770,23 +781,39 @@ export default class SignPanel extends Panel {
}
this
.
enterFrameCall
[
mvname
]
=
function
(
e
){
var
curframe
=
movieClips
[
'signgiftbox'
].
currentFrame
;
if
(
curframe
==
5
){
// egret.Tween.get(movieClips['signxistar'])
// .set({
// alpha:0
// })
// .to({
// alpha:1,
// },200)
// .call(()=>{
// movieClips['signxistar'].gotoAndPlay(1,1);
// },this);
if
(
curframe
==
50
){
egret
.
Tween
.
get
(
this
[
"lightbot"
]).
set
({
alpha
:
0.3
})
.
to
({
alpha
:
1
,
},
150
)
.
call
(()
=>
{
movieClips
[
'signxistar'
].
gotoAndPlay
(
1
,
1
);
},
this
);
}
else
if
(
curframe
==
150
){
egret
.
Tween
.
get
(
this
[
'giftbox'
])
.
to
({
alpha
:
0
},
200
);
if
(
movieClips
[
'signxistar'
]
&&
movieClips
[
'signxistar'
].
parent
){
movieClips
[
'signxistar'
].
parent
.
removeChild
(
movieClips
[
'signxistar'
]);
}
if
(
movieClips
[
'signfastar'
]){
//必放底///现改为仅礼盒有
this
[
'lightbot'
].
addChild
(
movieClips
[
'signfastar'
]);
movieClips
[
'signfastar'
].
gotoAndStop
(
1
);
egret
.
Tween
.
get
(
movieClips
[
'signfastar'
]).
set
({
alpha
:
0
})
.
to
({
alpha
:
1
,
},
150
)
.
call
(()
=>
{
movieClips
[
'signfastar'
].
gotoAndPlay
(
1
,
1
);
},
this
);
}
this
.
playShineDot
();
this
.
tweenShowGroup
();
}
...
...
@@ -794,11 +821,20 @@ export default class SignPanel extends Panel {
movieClips
[
'signgiftbox'
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
],
this
);
}
else
if
(
mvname
==
"signxistar"
){
if
(
this
.
enterFrameCall
[
mvname
]){
this
.
enterFrameCall
[
mvname
]
=
null
;
}
this
.
enterFrameCall
[
mvname
]
=
function
(
e
){
var
curframe
=
movieClips
[
"signxistar"
].
currentFrame
;
}
movieClips
[
"signxistar"
].
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
enterFrameCall
[
mvname
],
this
);
}
// if(mvname=="sign
xi
star"){//开始收
// if(mvname=="sign
fa
star"){//开始收
// let fun1;
// movieClips['sign
xi
star'].addEventListener(egret.Event.ENTER_FRAME,fun1 = function(e){
// var curframe = movieClips['sign
xi
star'].currentFrame;
// movieClips['sign
fa
star'].addEventListener(egret.Event.ENTER_FRAME,fun1 = function(e){
// var curframe = movieClips['sign
fa
star'].currentFrame;
// if(curframe>=80){
// e.target.stop()
// if (e.target.parent) {
...
...
@@ -812,7 +848,7 @@ export default class SignPanel extends Panel {
}
rmMvListener
(){
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"sign
xi
star"
];
var
svgas
=
[
"signgiftbox"
,
"signsandot"
,
"signshine"
,
"sign
fa
star"
];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
let
mvname
=
svgas
[
i
];
if
(
movieClips
[
mvname
]
&&
this
.
completeCall
[
mvname
]){
...
...
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