Commit b94b9b4f authored by 邱旭's avatar 邱旭

1

parent 28423b55
This diff is collapsed.
......@@ -22,6 +22,6 @@
<e:Group y="706" horizontalCenter="0">
<e:Label text="可使用的元宝:" x="34.88" y="0" textColor="0x885037" size="24" fontFamily="FZY3JW"/>
<e:Label id="moneyTxt" text="00000" x="192.97" y="0" textColor="0x885037" size="24" fontFamily="FZY3JW"/>
<e:Image source="common_yuanbao_png" x="2.93" y="1.04"/>
<e:Image source="common_yuanbao_png" x="2.93" y="1.04" scaleX="0.25" scaleY="0.25"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -3,8 +3,8 @@
xmlns:w="http://ns.egret.com/wing">
<e:Image y="-145.5" source="hbPrize_bg_png" horizontalCenter="1"/>
<e:Image id="img" width="508" height="225" source="{data.url}" y="518.96" horizontalCenter="0"/>
<e:Image id="prop" scaleX="1" scaleY="1" horizontalCenter="-70.5" source="taskPrize_money_png" verticalCenter="0.5"/>
<e:Group id="numsgroup" x="376.42" anchorOffsetX="0" width="188" anchorOffsetY="0" height="62" verticalCenter="0">
<e:Image id="prop" scaleX="1" scaleY="1" horizontalCenter="-70.5" source="taskPrize_money_png" verticalCenter="15.5"/>
<e:Group id="numsgroup" x="376.42" anchorOffsetX="0" width="188" anchorOffsetY="0" height="62" verticalCenter="15.5">
<e:Label id="nums" text="×8" size="48" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" textColor="0xC17343" left="0" bold="true"/>
</e:Group>
<e:Image id="money" source="signprize元宝_png" y="491.4" scaleX="0.8" scaleY="0.8" horizontalCenter="-3" visible="false"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteRuleSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="ruleBg" horizontalCenter="0" source="inviterulebg_png" y="117.2"/>
<e:Scroller id="scroller" width="545" height="497" y="365.2" anchorOffsetY="0" horizontalCenter="0.5">
<e:Group id="group" width="100%" y="2" x="1" anchorOffsetY="0" height="528">
<e:Image id="ruleBg" horizontalCenter="0" y="217.7" source="invite_rule_bg_png"/>
<e:Scroller id="scroller" width="545" height="538" y="324.2" anchorOffsetY="0" horizontalCenter="0.5">
<e:Group id="group" width="100%" y="2" x="1" anchorOffsetY="0" height="511">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615"/>
<e:layout>
<e:VerticalLayout/>
</e:layout>
</e:Group>
</e:Scroller>
<e:Button id="closeBtn" label="" x="601" y="271.7">
<e:Button id="closeBtn" label="" x="599" y="217.7">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......
......@@ -4,33 +4,33 @@
</w:Declarations>
<e:Image x="0" y="0" source="playSceneBg_jpg"/>
<e:Image y="116.85" source="targetBoard_png" x="204"/>
<e:Image x="0" y="47.35" source="progressDown_png"/>
<e:Image id="starProgress" x="73" y="77.85" source="starProgress_png"/>
<e:Image x="162.5" y="74.85" source="yezi1_png"/>
<e:Image x="0" y="28.85" source="stepsBoard_png"/>
<e:Image x="226.5" y="88.85" source="dangqianfenshu_png"/>
<e:Image y="245" source="targetBoard_png" x="174"/>
<e:Image y="0" source="progressDown_png" horizontalCenter="0"/>
<e:Image id="starProgress" x="131" y="201.85" source="starProgress_png"/>
<e:Image x="69" y="-1.15" source="stepsBoard_png"/>
<e:Image x="226.5" y="214.85" source="dangqianfenshu_png"/>
<e:Label id="targetScoreTxt" touchEnabled="false" size="26" width="292.85" anchorOffsetY="0" height="36" textAlign="center" anchorOffsetX="0" verticalAlign="middle" fontFamily="Microsoft YaHei" text="目标分数" y="169.85" textColor="0x9d4a06" bold="true" horizontalCenter="0.5"/>
<e:Label id="targetScoreTxt" touchEnabled="false" size="26" width="292.85" anchorOffsetY="0" height="36" textAlign="center" anchorOffsetX="0" verticalAlign="middle" fontFamily="Microsoft YaHei" text="目标分数" y="282.35" textColor="0x9d4a06" bold="true" horizontalCenter="0.5"/>
<e:Image source="lef_png" y="-2" x="0"/>
<e:Group id="settingAll" width="89" height="203" x="641" y="53" anchorOffsetY="0">
<e:Group id="settingGroup" width="72" height="282" x="8" y="29" anchorOffsetX="0" visible="false">
<e:Image x="0" y="0" source="mainSettingBg_png"/>
<e:Image id="musicBtn" x="14" y="174" source="mainMusicBtnOn_png"/>
<e:Image id="questionBtn" x="14" y="64" source="mainQuestionBtn_png"/>
<e:Image id="soundBtn" x="14" y="119" source="mainSoundBtnOn_png"/>
<e:Image id="quitBtn" x="14" y="228" source="mainQuitBtn_png"/>
<e:Image y="-13.03" source="mainSettingBg_png" horizontalCenter="0"/>
<e:Image id="questionBtn" y="53" source="mainQuestionBtn_png" horizontalCenter="1"/>
<e:Image id="soundBtn" y="105" source="mainSoundBtnOn_png" horizontalCenter="1"/>
<e:Image id="musicBtn" y="155" source="mainMusicBtnOn_png" horizontalCenter="1"/>
<e:Image id="quitBtn" y="205.99" source="mainQuitBtn_png" horizontalCenter="1"/>
</e:Group>
<e:Image id="settingBtn" x="-0.47" y="1" source="setting_png"/>
<e:Image id="settingBtn" y="1" source="setting_png" horizontalCenter="0"/>
</e:Group>
<e:Group id="redrainbg" width="750" height="1624">
<e:Group id="redrainbg" width="750" height="1624" visible="false">
<e:Image source="redrainbg_jpg"/>
<e:Label id="tips" text="正在加载中,请稍后" y="826.33" textColor="0x244B00" horizontalCenter="0" size="24" visible="false"/>
<e:Label id="percentTxt" text="63%" y="943.33" textColor="0x244B00" horizontalCenter="0.5"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<e:Image y="45" horizontalCenter="0" source="scratchPrize_bg_png"/>
<e:Image y="-123.17" horizontalCenter="0" source="scratchPrize_bg_png"/>
<e:Image id="prizeImg" y="426.77" source="" horizontalCenter="0" width="510" height="228"/>
<e:Button id="closeBtn" label="" x="624" y="313.33">
<e:Button id="closeBtn" label="" x="610" y="309.33">
<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"
......@@ -28,4 +28,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Component y="891" skinName="ADSmallSkin" x="84" visible="false"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteRuleSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect left="0" bottom="0" top="0" right="0" fillColor="0x000000" fillAlpha="0.7"/>
<e:Image id="ruleBg" horizontalCenter="0.5" y="152" source="scratch_rule_bg_png"/>
<e:Image id="ruleBg" y="262.61" source="scratch_rule_bg_png" horizontalCenter="0"/>
<e:Scroller id="scroller" width="545" x="104.76" height="507" y="377.2">
<e:Group id="group" width="100%">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0xa54615" fontFamily="FZY3JW"/>
......@@ -10,7 +10,7 @@
</e:layout>
</e:Group>
</e:Scroller>
<e:Button id="closeBtn" label="" x="614" y="301">
<e:Button id="closeBtn" label="" x="606.26" y="262.61">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......
......@@ -2,9 +2,10 @@
<e:Skin class="InviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing">
<w:Config id="16dd8f58b77" visible="false"/>
<e:Image id="light2" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png"/>
<e:Image id="light1" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png"/>
<e:Group id="con" y="53.03"/>
<e:Image source="scratch_bg_png" y="-157.17" x="0"/>
<e:Image id="light2" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png" visible="false"/>
<e:Image id="light1" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png" visible="false"/>
<e:Group id="con" y="53.03" visible="false"/>
<e:Label id="numLabel" text="共2位好友帮你刮了90.3%" y="381.33" textColor="0xF54500" size="27" horizontalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
<e:Image y="414" horizontalCenter="0" source="scratch_card_bg_png"/>
<e:Image id="prizeImg" y="435" source="" width="510" height="228" horizontalCenter="0"/>
......@@ -26,7 +27,7 @@
</e:skinName>
</e:Button>
<e:Label id="cutTimeLabel" text="23:43:21" y="888.5" size="28" textColor="0xffffff" fontFamily="FZY3JW" verticalAlign="middle" anchorOffsetX="0" width="749" textAlign="center" horizontalCenter="0"/>
<e:Label text="帮刮\n记录" y="805" size="28" textColor="0xFFFFFF" horizontalCenter="-248"/>
<e:Label text="帮刮\n记录" y="805" size="28" textColor="0xFFFFFF" horizontalCenter="-248" visible="false"/>
<e:Scroller width="487" height="90" y="783" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="32.5">
<e:Group anchorOffsetX="0" y="2">
<e:List id="list" x="0" y="0" anchorOffsetX="0">
......
......@@ -436,7 +436,7 @@ export default class MainScene extends Scene {
//第几关
var chapterTxt = new ChapterNum();
chapterTxt.num = this.chapter >> 0;
chapterTxt.x = 122;
chapterTxt.x = 542;
chapterTxt.y = 148
this.addChild(chapterTxt)
//步数
......@@ -528,7 +528,7 @@ export default class MainScene extends Scene {
}
this.elementTargets = new ElementTargets(this.passElements);
this.elementTargets.x = 375;
this.elementTargets.y = 155;
this.elementTargets.y = 255;
this.addChild(this.elementTargets);
this.targetScoreTxt.visible = false;
} else {
......
......@@ -83,11 +83,12 @@ export default class ScratchIcon extends IconBase {
case (status == 0): // 当前无任务(一般icon不会出现),拦截
break;
case (status == 1): // 当前任务进行中 打开任务面板
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// await wait(100);
data.mv = mv;
// loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// // await wait(100);
// data.mv = mv;
// PanelCtrl.instance.show('scratch', data);
// });
PanelCtrl.instance.show('scratch', data);
});
break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口
try {
......
......@@ -61,25 +61,25 @@ export default class ScratchPanel extends Panel {
this.setGtaphics(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
}, 500);
this['light1'].visible = this['light2'].visible = false;
// this['light1'].visible = this['light2'].visible = false;
this['con'].addChild(this.data.mv);
this.data.mv.gotoAndPlay(1, true);
this.data.mv.once(egret.Event.COMPLETE, () => {
this.data.mv.stop(1);
}, this);
// this['con'].addChild(this.data.mv);
// this.data.mv.gotoAndPlay(1, true);
// this.data.mv.once(egret.Event.COMPLETE, () => {
// this.data.mv.stop(1);
// }, this);
setTimeout(() => {
this.playBgAni();
}, 500);
// setTimeout(() => {
// this.playBgAni();
// }, 500);
}
playBgAni() {
this['light1'].visible = this['light2'].visible = true;
const time = 7000;
egret.Tween.get(this['light1'], { loop: true }).to({ rotation: 360 }, time);
egret.Tween.get(this['light2'], { loop: true }).to({ rotation: -360 }, time);
}
// playBgAni() {
// this['light1'].visible = this['light2'].visible = true;
// const time = 7000;
// egret.Tween.get(this['light1'], { loop: true }).to({ rotation: 360 }, time);
// egret.Tween.get(this['light2'], { loop: true }).to({ rotation: -360 }, time);
// }
showlog() {
NetManager.ins.showLog(getlogItem(50));
......
......@@ -72,7 +72,7 @@ export default class ScratchPrizePanel extends Panel {
initUI() {
this.prizeImg.source = this.data.prizeImage;
addAdComp(84, 875, this,54);
addAdComp(84, 891, this,54);
}
protected get closeBtns(): eui.Button[] {
......
......@@ -117,13 +117,14 @@ export default class TurnPrize2Panel extends Panel {
this.hidePanel();
break;
case (status == 1): // 当前任务进行中 打开任务面板
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// await wait(100);
// loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// // await wait(100);
// const data = Utils.deepClone(res.data);
// data.mv = mv;
// PanelCtrl.instance.show('scratch', data);
// });
const data = Utils.deepClone(res.data);
data.mv = mv;
PanelCtrl.instance.show('scratch', data);
});
// PanelCtrl.instance.show('scratch', res.data);
break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口
try {
......
......@@ -16,19 +16,20 @@ export class ChapterNum extends egret.DisplayObjectContainer {
get num(): number {
return this._num
}
set num(value: number) {
if (value == this._num) return;
if(value == this._num) return;
this._num = value;
var arr = Tool.returnTO(value);
//位数从小到大add,
for (var i = 0; i < arr.length; i++) {
if (this.$children[i]) {
for(var i = 0; i < arr.length; i++) {
if(this.$children[i]) {
//先用完原先$children里的,不通用就没必要修改resName
this.$children[i]["num"] = arr[i];
} else {
//如果没有就
let o: BitmapNumber = Pool.takeOut(RecoverName.BITMAP_NUMBER);
if (!o) {
if(!o) {
o = new BitmapNumber("propNum");
} else {
o.reset("propNum")
......@@ -38,9 +39,9 @@ export class ChapterNum extends egret.DisplayObjectContainer {
}
}
//如果多了,去掉后面的,回收
if (this.$children.length > arr.length) {
if(this.$children.length > arr.length) {
//移除后序
for (var i = this.$children.length - 1; i >= arr.length; i--) {
for(var i = this.$children.length - 1; i >= arr.length; i--) {
let c = this.$children[i];
this.removeChild(c);
Pool.recover(RecoverName.BITMAP_NUMBER, c);
......@@ -61,9 +62,9 @@ export class ChapterNum extends egret.DisplayObjectContainer {
center() {
//按顺序排,从右到左,
var len = this.$children.length;
var w = this.$children[0]["texture"].textureWidth-2;
var w = this.$children[0]["texture"].textureWidth - 2;
var right = len / 2 * w - w;
for (var i = 0; i < this.$children.length; i++) {
for(var i = 0; i < this.$children.length; i++) {
this.$children[i].x = right - w * i;
}
}
......
......@@ -25,8 +25,9 @@ export class ElementTarget extends egret.DisplayObjectContainer {
get count(): number {
return this._count;
}
set count(value: number) {
if (value <= 0) {
if(value <= 0) {
value = 0;
this.countNum.visible = false;
this.zeroMark.visible = true;
......@@ -34,11 +35,13 @@ export class ElementTarget extends egret.DisplayObjectContainer {
this._count = value;
this.countNum.num = value;
}
constructor(type: ElementType) {
super()
var texture: egret.Texture = RES.getRes("ele" + type + "_png");
var showImage = new egret.Bitmap(texture);
showImage.scaleX = showImage.scaleY = 0.8
showImage.scaleX = showImage.scaleY = 0.7;
showImage.y = 10;
this.addChild(showImage);
var texture: egret.Texture = RES.getRes("rightMark_png");
this.zeroMark = new egret.Bitmap(texture);
......@@ -48,7 +51,7 @@ export class ElementTarget extends egret.DisplayObjectContainer {
this.addChild(this.zeroMark);
this.countNum = new TargetNumber();
this.countNum.x = 55;
this.countNum.y = 45;
this.countNum.y = 48;
this.addChild(this.countNum);
}
}
\ No newline at end of file
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