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
ecd9bc99
Commit
ecd9bc99
authored
May 22, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整svga
parent
0b67e6c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletion
+82
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-0
RedBombAlertPanel.ts
egret/src/panels/RedBombAlertPanel.ts
+76
-0
award.json
mock/happyclear/award.json
+1
-1
No files found.
egret/src/mapScene/MapScene.ts
View file @
ecd9bc99
...
...
@@ -1246,6 +1246,11 @@ export default class MapScene extends Scene {
}
onTap_signBtn
()
{
NetManager
.
ins
.
hc_redBombAward
((
success
)
=>
{
PanelCtrl
.
instance
.
show
(
'RedBombAlert'
);
})
return
;
NetManager
.
ins
.
getSignInfo
(()
=>
{
PanelCtrl
.
instance
.
show
(
'sign'
);
},
window
[
'signActivityId'
])
...
...
egret/src/panels/RedBombAlertPanel.ts
View file @
ecd9bc99
...
...
@@ -106,6 +106,8 @@ export default class RedBombAlertPanel extends Panel {
});
}
prizeMv
:
any
;
isShow
:
boolean
=
true
;
playPrizeAni
()
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/redbomb_prize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
mv
.
y
=
this
.
alertHeight
;
...
...
@@ -158,10 +160,84 @@ export default class RedBombAlertPanel extends Panel {
},
1700
);
// for(var mvkey=0;mvkey<mv.)
// console.log("红包奖励弹窗",img,mv,mv.getOwnPropertyNames());
this
.
isShow
=
isShow
;
mv
.
setImage
(
"815207F0-919C-4796-A09E-21868AF337CB"
,
img
);
this
.
prizeMv
=
mv
;
if
(
!
this
.
isShow
){
let
changeimg
=
this
.
getchangeImg
();
if
(
changeimg
){
changeimg
.
anchorOffsetX
=
500
/
2
;
changeimg
.
anchorOffsetY
=
233
/
2
;
var
cx
=
changeimg
.
x
;
var
cy
=
changeimg
.
y
;
cx
+=
500
/
2
;
cy
+=
500
/
2
;
changeimg
.
x
=
cx
;
changeimg
.
y
=
cy
;
}
egret
.
startTick
(
this
.
update
,
this
);
}
else
{
egret
.
stopTick
(
this
.
update
,
this
);
}
},
100
)
});
}
getchangeImg
(){
if
(
this
.
prizeMv
){
let
changeimg
:
egret
.
Bitmap
;
for
(
var
i
=
0
;
i
<
this
.
prizeMv
.
$children
.
length
;
i
++
)
{
var
n
=
this
.
prizeMv
.
$children
[
i
];
if
(
n
.
imageKey
==
"815207F0-919C-4796-A09E-21868AF337CB"
){
changeimg
=
n
;
break
;
}
}
return
changeimg
;
}
}
update
(
t
){
if
(
this
.
prizeMv
&&!
this
.
isShow
){
let
changeimg
=
this
.
getchangeImg
();
if
(
!
changeimg
){
return
false
;
}
var
curframe
=
this
.
prizeMv
.
currentFrame
;
if
(
curframe
>=
180
){
changeimg
.
x
=
382
;
changeimg
.
y
=
375
;
return
false
;
}
var
sx
=
changeimg
.
x
;
var
sy
=
changeimg
.
y
;
// sx += 500/2;
sy
+=
233
/
2
;
changeimg
.
x
=
382
;
changeimg
.
y
=
sy
;
console
.
log
(
"测试红包图"
,
this
.
prizeMv
,
sx
,
sy
,
this
.
prizeMv
.
currentFrame
,
"宽高设置:"
+
changeimg
.
width
,
changeimg
.
height
);
console
.
error
(
"缩放设置"
,
changeimg
.
scaleX
,
changeimg
.
scaleY
);
// console.log("原大小",swidth,sheight,sx,sy);
// changeimg.anchorOffsetX = 500/2;
// changeimg.anchorOffsetY = 233/2;
// changeimg.scaleX = 3;
// changeimg.scaleY = 3;
// changeimg.x = 500
// changeimg.x =
// changeimg.width = 300;
// changeimg.height = 133;
// changeimg.x = sx+(swidth-changeimg.width)/2;
// changeimg.y = sy+(sheight-changeimg.height)/2;
// console.log("修改image",changeimg);
}
return
false
;
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
...
...
mock/happyclear/award.json
View file @
ecd9bc99
...
...
@@ -5,7 +5,7 @@
"timestamp"
:
1579512019430
,
"data"
:
{
"option"
:{
"img"
:
"//yun.dui
88.com/images/202002/cskn0xnuov
.png"
,
"img"
:
"//yun.dui
ba.com.cn/aurora/assets/b3ea9ed5b85ec4a4c7f8c7f73a802e871d1cc1c4
.png"
,
"categoryType"
:
7
,
"num"
:
"33"
,
"propType"
:
null
,
...
...
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