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
f16a3fd2
Commit
f16a3fd2
authored
Oct 09, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
54697ff1
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
94 additions
and
11 deletions
+94
-11
friend_icon1.png
egret/resource/assets/friend/friend_icon1.png
+0
-0
friend_icon2.png
egret/resource/assets/friend/friend_icon2.png
+0
-0
friend_icon3.png
egret/resource/assets/friend/friend_icon3.png
+0
-0
friend_itembg.png
egret/resource/assets/friend/friend_itembg.png
+0
-0
friendbg.png
egret/resource/assets/friend/friendbg.png
+0
-0
friend按钮-炫耀.png
egret/resource/assets/friend/friend按钮-炫耀.png
+0
-0
default.res.json
egret/resource/default.res.json
+31
-1
default.thm.json
egret/resource/default.thm.json
+1
-0
AvatarSkin.exml
egret/resource/skins/AvatarSkin.exml
+8
-0
FriendItemSkin.exml
egret/resource/skins/FriendItemSkin.exml
+3
-2
FriendSkin.exml
egret/resource/skins/FriendSkin.exml
+16
-5
MapSkin.exml
egret/resource/skins/MapSkin.exml
+1
-1
AvatarComp.ts
egret/src/mapScene/AvatarComp.ts
+12
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+19
-0
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+3
-2
No files found.
egret/resource/assets/friend/friend_icon1.png
0 → 100644
View file @
f16a3fd2
8.31 KB
egret/resource/assets/friend/friend_icon2.png
0 → 100644
View file @
f16a3fd2
8.61 KB
egret/resource/assets/friend/friend_icon3.png
0 → 100644
View file @
f16a3fd2
8.38 KB
egret/resource/assets/friend/friend_itembg.png
0 → 100644
View file @
f16a3fd2
28.6 KB
egret/resource/assets/friend/friendbg.png
0 → 100644
View file @
f16a3fd2
160 KB
egret/resource/assets/friend/friend按钮-炫耀.png
0 → 100644
View file @
f16a3fd2
24.1 KB
egret/resource/default.res.json
View file @
f16a3fd2
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
},
},
{
{
"name"
:
"preload"
,
"name"
:
"preload"
,
"keys"
:
"namebg_png,avatar_png,invite_txtbg_png,invite_icon_png,taskicon_png,friend_avatar_png,ad_icon_png,testavatar_png"
"keys"
:
"namebg_png,avatar_png,invite_txtbg_png,invite_icon_png,taskicon_png,friend_avatar_png,ad_icon_png,testavatar_png
,friend按钮-炫耀_png,friend_icon1_png,friend_icon2_png,friend_icon3_png,friend_itembg_png,friendbg_png
"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -2013,6 +2013,36 @@
...
@@ -2013,6 +2013,36 @@
"name"
:
"testavatar_png"
,
"name"
:
"testavatar_png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"url"
:
"assets/testavatar.png"
"url"
:
"assets/testavatar.png"
},
{
"name"
:
"friend按钮-炫耀_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friend按钮-炫耀.png"
},
{
"name"
:
"friend_icon1_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friend_icon1.png"
},
{
"name"
:
"friend_icon2_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friend_icon2.png"
},
{
"name"
:
"friend_icon3_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friend_icon3.png"
},
{
"name"
:
"friend_itembg_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friend_itembg.png"
},
{
"name"
:
"friendbg_png"
,
"type"
:
"image"
,
"url"
:
"assets/friend/friendbg.png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
f16a3fd2
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"skins"
:
{},
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/AvatarSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/BloodSkin.exml"
,
"resource/skins/BloodSkin.exml"
,
...
...
egret/resource/skins/AvatarSkin.exml
0 → 100644
View file @
f16a3fd2
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"AvatarSkin"
width=
"79"
height=
"85"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"friend_avatar_png"
/>
<e:Group
x=
"8.5"
y=
"8.8"
>
<e:Image
id=
"avatar"
y=
"0"
source=
"testavatar_png"
width=
"64"
height=
"64"
x=
"0"
/>
<e:Rect
id=
"avatarMask"
width=
"64"
height=
"64"
y=
"0"
ellipseWidth=
"64"
ellipseHeight=
"64"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/resource/skins/FriendItemSkin.exml
View file @
f16a3fd2
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"FriendItemSkin"
width=
"400"
height=
"50"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"FriendItemSkin"
width=
"546"
height=
"105"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Label
id=
"nameTxt"
text=
"111"
x=
"20"
y=
"16"
/>
<e:Image
source=
"friend_itembg_png"
/>
<e:Label
id=
"nameTxt"
text=
"111"
x=
"490"
y=
"52.5"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/FriendSkin.exml
View file @
f16a3fd2
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"FriendSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"FriendSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"
闯关失败_png"
y=
"27
"
horizontalCenter=
"0"
/>
<e:Image
source=
"
friendbg_png"
y=
"31
"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"6
09"
y=
"197
"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"6
32.94"
y=
"164.98
"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Scroller
id=
"scroll"
width=
"
400"
height=
"400"
y=
"279"
horizontalCenter=
"0"
scrollPolicyV=
"on"
scrollPolicyH=
"off
"
>
<e:Scroller
id=
"scroll"
width=
"
546"
height=
"555"
y=
"412.35"
scrollPolicyV=
"on"
scrollPolicyH=
"off"
x=
"122
"
>
<e:Group>
<e:Group>
<e:List
id=
"list"
width=
"100%"
itemRendererSkinName=
"FriendItemSkin"
>
<e:List
id=
"list"
width=
"100%"
itemRendererSkinName=
"FriendItemSkin"
>
<e:ArrayCollection>
<e:ArrayCollection>
...
@@ -27,10 +27,21 @@
...
@@ -27,10 +27,21 @@
</e:Array>
</e:Array>
</e:ArrayCollection>
</e:ArrayCollection>
<e:layout>
<e:layout>
<e:VerticalLayout
gap=
"
0
"
/>
<e:VerticalLayout
gap=
"
6
"
/>
</e:layout>
</e:layout>
</e:List>
</e:List>
</e:Group>
</e:Group>
</e:Scroller>
</e:Scroller>
<e:Label
text=
"friendBtn"
x=
"80"
y=
"468"
/>
<e:Button
id=
"btn"
label=
""
y=
"985.99"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"friend按钮-炫耀_png"
source.down=
"friend按钮-炫耀_png"
source.disabled=
"friend按钮-炫耀_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group
x=
"323.87"
y=
"104.79"
>
<e:Image
id=
"avatar"
y=
"0"
source=
"testavatar_png"
width=
"120"
height=
"120"
x=
"0"
/>
<e:Rect
id=
"avatarMask"
width=
"120"
height=
"120"
y=
"0"
ellipseWidth=
"120"
ellipseHeight=
"120"
/>
</e:Group>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
f16a3fd2
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
</e:Group>
</e:Group>
<e:Group
id=
"friendBtn"
x=
"13.56"
y=
"126.88"
width=
"171"
height=
"120"
>
<e:Group
id=
"friendBtn"
x=
"13.56"
y=
"126.88"
width=
"171"
height=
"120"
>
<e:Image
source=
"avatar_png"
y=
"0"
horizontalCenter=
"0"
/>
<e:Image
source=
"avatar_png"
y=
"0"
horizontalCenter=
"0"
/>
<e:Group
x=
"38.5"
y=
"10"
locked=
"true"
>
<e:Group
x=
"38.5"
y=
"10"
>
<e:Image
id=
"avatar"
y=
"0"
source=
"testavatar_png"
width=
"96"
height=
"96"
x=
"0"
/>
<e:Image
id=
"avatar"
y=
"0"
source=
"testavatar_png"
width=
"96"
height=
"96"
x=
"0"
/>
<e:Rect
id=
"avatarMask"
width=
"96"
height=
"96"
x=
"0"
y=
"0"
ellipseWidth=
"96"
ellipseHeight=
"96"
/>
<e:Rect
id=
"avatarMask"
width=
"96"
height=
"96"
x=
"0"
y=
"0"
ellipseWidth=
"96"
ellipseHeight=
"96"
/>
</e:Group>
</e:Group>
...
...
egret/src/mapScene/AvatarComp.ts
0 → 100644
View file @
f16a3fd2
import
ComponentBase
from
"../../libs/new_wx/components/ComponentBase"
;
export
default
class
AvatarComp
extends
ComponentBase
{
start
(
data
?)
{
this
.
touchEnabled
=
this
.
touchChildren
=
false
;
super
.
start
(
data
);
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
}
get
skinKey
():
string
{
return
'Avatar'
}
}
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
f16a3fd2
...
@@ -18,6 +18,7 @@ import setGray from "../setGray";
...
@@ -18,6 +18,7 @@ import setGray from "../setGray";
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
CountDown
from
"./CountDown"
;
import
CountDown
from
"./CountDown"
;
import
AvatarComp
from
"./AvatarComp"
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
...
@@ -145,6 +146,7 @@ export default class MapScene extends Scene {
...
@@ -145,6 +146,7 @@ export default class MapScene extends Scene {
this
.
updateHomeData
();
this
.
updateHomeData
();
this
.
updateAvatars
();
this
.
showLog
();
this
.
showLog
();
this
.
updateBox
();
this
.
updateBox
();
...
@@ -261,6 +263,23 @@ export default class MapScene extends Scene {
...
@@ -261,6 +263,23 @@ export default class MapScene extends Scene {
updateScene
()
{
updateScene
()
{
this
.
updateHomeData
();
this
.
updateHomeData
();
}
}
addAvatar
(
level
,
data
?){
const
item
=
MapScene
.
starHash
[
level
];
const
parent
=
item
.
parent
;
const
avatar
=
new
AvatarComp
();
avatar
.
loadSkin
();
avatar
.
start
(
data
);
parent
.
addChild
(
avatar
);
avatar
.
x
=
item
.
x
;
avatar
.
y
=
item
.
y
-
avatar
.
height
;
}
updateAvatars
(){
// 4 70
this
.
addAvatar
(
4
);
this
.
addAvatar
(
70
);
this
.
addAvatar
(
71
);
}
updateHomeData
()
{
updateHomeData
()
{
const
homeData
=
getHomeData
();
const
homeData
=
getHomeData
();
...
...
egret/src/panels/FriendPanel.ts
View file @
f16a3fd2
...
@@ -12,7 +12,7 @@ export default class FriendPanel extends Panel {
...
@@ -12,7 +12,7 @@ export default class FriendPanel extends Panel {
const
ac
=
new
eui
.
ArrayCollection
([
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]);
const
ac
=
new
eui
.
ArrayCollection
([
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]);
this
.
list
.
dataProvider
=
ac
;
this
.
list
.
dataProvider
=
ac
;
this
[
'btn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
);
}
}
showlog
(){
showlog
(){
...
@@ -27,8 +27,9 @@ export default class FriendPanel extends Panel {
...
@@ -27,8 +27,9 @@ export default class FriendPanel extends Panel {
}
}
onTapInvite
()
{
onTapInvite
()
{
console
.
log
(
'onTapInvite'
)
}
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
get
skinKey
()
{
return
'Friend'
}
get
skinKey
()
{
return
'Friend'
}
}
}
\ 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