Commit 26b0cb54 authored by 邱旭's avatar 邱旭

1

parents 16b95fbe e4972da2
......@@ -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
......@@ -89,12 +89,17 @@
"name": "signprize"
},
{
<<<<<<< HEAD
"keys": "namebg_png,avatar_png,invite_txtbg_png,invite_icon_png,taskicon_png,friend_avatar_png,ad_icon_png,testavatar_png",
"name": "preload"
},
{
"keys": "invite_bg_png,invite_help_png,invite_invite_png,invite_rule_bg_png,invite_btn_png,invite_prize_ad_png,invite_prize_bg_png,invite_prize_btn_png",
"name": "invite"
=======
"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,ad_closebtn_png,startpanel_icon1_png,startpanel_icon2_png,startpanel_icon3_png,startpanel_icon_png,startpanel_avatar_png,startpanel_bg2_png"
>>>>>>> e4972da2d589501b0f375aac75d85b8acfb74408
}
],
"resources": [
......@@ -2056,7 +2061,76 @@
{
"url": "assets/invite/invite_prize_btn.png",
"type": "image",
<<<<<<< HEAD
"name": "invite_prize_btn_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"
},
{
"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"
>>>>>>> e4972da2d589501b0f375aac75d85b8acfb74408
}
]
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/AvatarSkin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/Blood2Skin.exml",
"resource/skins/BloodSkin.exml",
......@@ -45,6 +46,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: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="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
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendItem2Skin" width="108" height="137" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="startpanel_avatar_png" horizontalCenter="0.5" y="5"/>
<e:Label id="nameTxt" text="Label" y="89.5" size="16" textColor="0x784325" horizontalCenter="0.5"/>
<e:Label text="分数:12345分" y="115.29" id="score" size="16" anchorOffsetX="0" anchorOffsetY="0" textColor="0x784325" horizontalCenter="0.5"/>
<e:Group x="22" y="14">
<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:Group x="8">
<e:Image id="rank1" x="-5" y="0" source="startpanel_icon1_png" visible="false"/>
<e:Image id="rank2" x="-5" y="0" source="startpanel_icon2_png" visible="false"/>
<e:Image id="rank3" x="-3" source="startpanel_icon3_png" visible="false"/>
<e:Group x="-4" y="0">
<e:Image id="rankbg" source="startpanel_icon_png"/>
<e:Label id="rankTxt" text="73" textAlign="center" verticalAlign="middle" size="20" textColor="0xffffff" width="31" height="31"/>
</e:Group>
</e:Group>
</e:Skin>
\ No newline at end of file
<?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:Label id="nameTxt" text="111" x="20" y="16"/>
<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="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="闯关失败_png" y="27" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="609" y="197">
<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">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......@@ -9,7 +10,7 @@
</e:Skin>
</e:skinName>
</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:List id="list" width="100%" itemRendererSkinName="FriendItemSkin">
<e:ArrayCollection>
......@@ -27,10 +28,30 @@
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:VerticalLayout gap="0"/>
<e:VerticalLayout gap="6"/>
</e:layout>
</e:List>
</e:Group>
</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: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"/>
......@@ -150,7 +150,7 @@
</e:Group>
<e:Group id="friendBtn" x="13.56" y="126.88" width="171" height="120">
<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:Rect id="avatarMask" width="96" height="96" x="0" y="0" ellipseWidth="96" ellipseHeight="96"/>
</e:Group>
......
<?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,18 @@
</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" y="973">
<e:ArrayCollection>
<e:Array>
<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
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
......@@ -18,6 +18,7 @@ import setGray from "../setGray";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
import CountDown from "./CountDown";
import AvatarComp from "./AvatarComp";
export default class MapScene extends Scene {
......@@ -35,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();
......@@ -145,6 +146,7 @@ export default class MapScene extends Scene {
this.updateHomeData();
this.updateAvatars();
this.showLog();
this.updateBox();
......@@ -261,6 +263,23 @@ export default class MapScene extends Scene {
updateScene() {
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() {
const homeData = getHomeData();
......
......@@ -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
import getSkinPath from "../../libs/new_wx/utils/getSkinPath";
export default class FriendItem2Renderer extends eui.ItemRenderer {
constructor() {
super();
this.skinName = getSkinPath('FriendItem2');
}
score: eui.Label;
dataChanged() {
const rank = this.data;
this['avatar'].mask = this['avatarMask'];
this['rankbg'].visible =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['rankbg'].visible = true;
}
this['nameTxt'].text = this.data + 'name';
this.score.textFlow = (new egret.HtmlTextParser).parser(
`分数:<font color=0xff4501><b>${15}</b></font>分`);
}
}
\ 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);
}
showlog(){
showlog() {
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
}
......@@ -27,8 +35,9 @@ export default class FriendPanel extends Panel {
}
onTapInvite() {
console.log('onTapInvite')
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'Friend' }
}
\ No newline at end of file
import wait from "../../libs/new_tc/wait";
import hdGameDoDojoin from "../../libs/new_tw/ctrls/hdGameDoDojoin";
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import setGlow from "../setGlow";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { updateMainTimerAfterGetData } from "../../libs/new_wx/MainBase";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import { Chapters } from "../something/Chapters";
import { PassType } from "../something/enum/PassType";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getHomeData, { getPropNums } from "../getHomeData";
import PropType from "../PropType";
import hdGameDoDojoin from "../../libs/new_tw/ctrls/hdGameDoDojoin";
import TargetItemRenderer from "./TargetItemRenderer";
import { ElementType } from "../something/enum/ElementType";
import { iswx } from "../iswx";
import { getShareUrl } from "../getSharePic";
import { iswx } from "../iswx";
import PropType from "../PropType";
import setGlow from "../setGlow";
import { showShare } from "../shareCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import wait from "../../libs/new_tc/wait";
import { updateMainTimerAfterGetData } from "../../libs/new_wx/MainBase";
import { Chapters } from "../something/Chapters";
import { ElementType } from "../something/enum/ElementType";
import { PassType } from "../something/enum/PassType";
import FriendItem2Renderer from "./FriendItem2Renderer";
import TargetItemRenderer from "./TargetItemRenderer";
export default class StartPanel extends Panel {
private _level;
private list: eui.List;
public friendlist: eui.List;
start(data) {
super.start();
this.friendlist.useVirtualLayout = false;
this.friendlist.itemRenderer = FriendItem2Renderer;
const friends = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
if (friends.length > 5)
friends.length = 5;
const ac = new eui.ArrayCollection(friends);
this.friendlist.dataProvider = ac;
setGlow(this['levelTxt'], 0xfa4b09, 1);
this['levelTxt'].text = `第${data}关`;
this._level = data;
......
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