Commit 5d843995 authored by wildfirecode's avatar wildfirecode

1

parent f16a3fd2
......@@ -201,5 +201,13 @@
"value": "http://yun.duiba.com.cn/db_games/0927/33256.png"
}
]
},
"16db3bd8eb8": {
"bindingDataTestObj": [
{
"key": "data.img",
"value": "http://yun.duiba.com.cn/db_games/fishlogo.png"
}
]
}
}
\ No newline at end of file
......@@ -90,7 +90,7 @@
},
{
"name": "preload",
"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"
"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,ad_closebtn_png,startpanel_icon1_png,startpanel_icon2_png,startpanel_icon3_png,startpanel_icon_png,startpanel_avatar_png,startpanel_bg2_png"
}
],
"resources": [
......@@ -2043,6 +2043,41 @@
"name": "friendbg_png",
"type": "image",
"url": "assets/friend/friendbg.png"
},
{
"name": "ad_closebtn_png",
"type": "image",
"url": "assets/ad/ad_closebtn.png"
},
{
"name": "startpanel_icon1_png",
"type": "image",
"url": "assets/startpanel2/startpanel_icon1.png"
},
{
"name": "startpanel_icon2_png",
"type": "image",
"url": "assets/startpanel2/startpanel_icon2.png"
},
{
"name": "startpanel_icon3_png",
"type": "image",
"url": "assets/startpanel2/startpanel_icon3.png"
},
{
"name": "startpanel_icon_png",
"type": "image",
"url": "assets/startpanel2/startpanel_icon.png"
},
{
"name": "startpanel_avatar_png",
"type": "image",
"url": "assets/startpanel2/startpanel_avatar.png"
},
{
"name": "startpanel_bg2_png",
"type": "image",
"url": "assets/startpanel2/startpanel_bg2.png"
}
]
}
\ No newline at end of file
......@@ -45,6 +45,7 @@
"resource/skins/TaskSkin.exml",
"resource/skins/FriendSkin.exml",
"resource/skins/FriendItemSkin.exml",
"resource/skins/FriendItem2Skin.exml",
"resource/skins/TaskPrizeSkin.exml",
"resource/skins/ADSkin.exml",
"resource/skins/BackSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="AddSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui">
<e:Image source="闯关失败_png" y="27" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="609" y="197">
<e:Skin class="AddSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16db3bd8eb8"/>
<e:Image id="closeBtn2" y="142" horizontalCenter="0" width="540" height="600" source="{data.img}"/>
<e:Button id="closeBtn" label="" y="811" horizontalCenter="0">
<e:skinName>
<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:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="ad_closebtn_png" source.down="ad_closebtn_png" source.disabled="ad_closebtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="AD广告" x="260" y="604"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendItem2Skin" width="546" height="105" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="friend_itembg_png"/>
<e:Label id="rankTxt" text="73" width="86" textAlign="center" verticalAlign="middle" height="52" size="48" textColor="0x784325" y="25"/>
<e:Label text="X55" x="480.94" y="44.29" id="star" size="24" textColor="0x784325"/>
<e:Label id="nameTxt" text="Label" x="189" y="20.5" size="24" textColor="0x784325"/>
<e:Label text="第15关" x="189" y="54.29" id="progress" size="24" textColor="0x784325"/>
<e:Label text="分数:123分" x="297" y="54.29" id="score" size="24" anchorOffsetX="0" anchorOffsetY="0" textColor="0x784325"/>
<e:Group x="108.87" y="23.79">
<e:Image id="avatar" y="0" source="testavatar_png" width="60" height="60" x="0"/>
<e:Rect id="avatarMask" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/>
</e:Group>
<e:Group x="10" y="16">
<e:Image id="rank1" source="friend_icon1_png" x="0" y="0"/>
<e:Image id="rank2" source="friend_icon2_png" x="1" y="0"/>
<e:Image id="rank3" source="friend_icon3_png" x="3" y="2"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendItemSkin" width="546" height="105" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="friend_itembg_png"/>
<e:Label id="nameTxt" text="111" x="490" y="52.5"/>
<e:Label id="rankTxt" text="73" width="86" textAlign="center" verticalAlign="middle" height="52" size="48" textColor="0x784325" y="25"/>
<e:Label text="X55" x="480.94" y="44.29" id="star" size="24" textColor="0x784325"/>
<e:Label id="nameTxt" text="Label" x="189" y="20.5" size="24" textColor="0x784325"/>
<e:Label text="第15关" x="189" y="54.29" id="progress" size="24" textColor="0x784325"/>
<e:Label text="分数:123分" x="297" y="54.29" id="score" size="24" anchorOffsetX="0" anchorOffsetY="0" textColor="0x784325"/>
<e:Group x="108.87" y="23.79">
<e:Image id="avatar" y="0" source="testavatar_png" width="60" height="60" x="0"/>
<e:Rect id="avatarMask" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/>
</e:Group>
<e:Group x="10" y="16">
<e:Image id="rank1" source="friend_icon1_png" x="0" y="0"/>
<e:Image id="rank2" source="friend_icon2_png" x="1" y="0"/>
<e:Image id="rank3" source="friend_icon3_png" x="3" y="2"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?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:Image source="friendbg_png" y="31" horizontalCenter="0"/>
<e:Image source="friendbg_png" y="31" horizontalCenter="1"/>
<e:Label id="star" text="X55" x="597.94" y="329.79" size="24"/>
<e:Button id="closeBtn" label="" x="632.94" y="164.98">
<e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
......@@ -44,4 +45,13 @@
<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:Group x="226.87" y="308.79">
<e:Image id="avatar0" y="0" source="testavatar_png" width="60" height="60" x="0"/>
<e:Rect id="avatarMask0" width="60" height="60" y="0" ellipseWidth="60" ellipseHeight="60"/>
</e:Group>
<e:Label id="nickNameTxt" text="nickname" y="245" textColor="0x784325" horizontalCenter="6.5"/>
<e:Label id="rankTxt" text="73" x="112" y="311" width="86" textAlign="center" verticalAlign="middle" height="52" size="48"/>
<e:Label id="nameTxt" text="Label" x="306" y="307" size="24"/>
<e:Label id="progress" text="第15关" x="306" y="340.79" size="24"/>
<e:Label id="score" text="分数:123分" x="414" y="340.79" size="24" anchorOffsetX="0" anchorOffsetY="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="rectbg" width="750" height="1206" x="0" y="-2"/>
<e:Rect id="rectbg" width="750" height="1206" x="0" y="-3"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true">
<e:Group id="scrollGroup">
</e:Group>
......@@ -67,7 +67,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="taskBtn" label="" x="572.62" y="248.51">
<e:Button id="taskBtn" label="" x="572.62" y="248.51" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="taskicon_png" source.down="taskicon_png" source.disabled="taskicon_png"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StartPanelSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cd285c715"/>
<e:Image source="startpanel_bg2_png" y="925" horizontalCenter="0"/>
<e:Image y="52" horizontalCenter="0" source="startpanel通关条件_png"/>
<e:Label id="levelTxt" text="第一关" y="204" horizontalCenter="0" size="42"/>
<e:Label id="targetTxt" text="在规定的步数内\n消除足够数量目标" y="332" width="444" x="157" textAlign="center" lineSpacing="15" verticalAlign="middle" height="156" anchorOffsetX="0" textColor="0xa32020" visible="false"/>
......@@ -60,4 +61,23 @@
</e:List>
<e:Label id="tips" text="在指定步数内消灭目标元素" y="7" size="23" textColor="0x885037" bold="true" horizontalCenter="0"/>
</e:Group>
<e:List id="friendlist" itemRendererSkinName="FriendItem2Skin" horizontalCenter="0">
<e:ArrayCollection>
<e:Array>
<e:Object a="taskname1"/>
<e:Object a="taskname2"/>
<e:Object a="taskname3"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:HorizontalLayout/>
</e:layout>
</e:List>
</e:Skin>
\ No newline at end of file
......@@ -36,9 +36,9 @@ export default class MapScene extends Scene {
this['avatar'].mask = this['avatarMask'];
// setTimeout(() => {
// PanelCtrl.instance.show('invite');
// }, 3000);
setTimeout(() => {
PanelCtrl.instance.show('StartPanel',1);
}, 1000);
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
......
......@@ -4,6 +4,7 @@ export default class ADPanel extends Panel {
start(data) {
super.start();
this.showlog();
}
showlog(){
......@@ -20,6 +21,6 @@ export default class ADPanel extends Panel {
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
protected get closeBtns(): eui.Button[] { return [this['closeBtn'],this['closeBtn2']] }
get skinKey() { return 'AD' }
}
\ No newline at end of file
......@@ -5,8 +5,29 @@ export default class FriendItemRenderer extends eui.ItemRenderer {
super();
this.skinName = getSkinPath('FriendItem');
}
progress: eui.Label;
score: eui.Label;
dataChanged() {
const rank = this.data;
dataChanged(){
this['nameTxt'].text = this.data + '';
this['avatar'].mask = this['avatarMask'];
this['rank1'].visible = this['rank2'].visible = this['rank3'].visible = this['rankTxt'].visible = false;
this['rankTxt'].text = rank + '';
if (rank == 1) {
this['rank1'].visible = true;
} else if (rank == 2) {
this['rank2'].visible = true;
} else if (rank == 3) {
this['rank3'].visible = true;
} else {
this['rankTxt'].visible = true;
}
this['nameTxt'].text = this.data + 'name';
this.progress.textFlow = (new egret.HtmlTextParser).parser(
`第<font color=0xff4501><b>${15}</b></font>关`);
this.score.textFlow = (new egret.HtmlTextParser).parser(
`分数:<font color=0xff4501><b>${15}</b></font>分`);
}
}
\ No newline at end of file
......@@ -3,19 +3,27 @@ import FriendItemRenderer from "./FriendItemRenderer";
export default class FriendPanel extends Panel {
public list: eui.List;
progress: eui.Label;
score: eui.Label;
start(data) {
super.start();
this.showlog();
this.progress.textFlow = (new egret.HtmlTextParser).parser(
`第<font color=0xfff000><b>${15}</b></font>关`);
this.score.textFlow = (new egret.HtmlTextParser).parser(
`分数:<font color=0xfff000><b>${15}</b></font>分`);
this['avatar'].mask = this['avatarMask'];
this['avatar0'].mask = this['avatarMask0'];
this.list.useVirtualLayout = false;
this.list.itemRenderer = FriendItemRenderer;
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['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTapInvite,this);
this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
}
showlog(){
showlog() {
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment