Commit 66cd1022 authored by wildfirecode's avatar wildfirecode

Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev

parents dcdb6b86 a8b84604
......@@ -331,6 +331,9 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i <= 9; i++) {
RES.getResAsync("propNum" + i + "_png")
}
RES.getResAsync("propNum" + "第" + "_png");
RES.getResAsync("propNum" + "关" + "_png");
// for (var i = 1; i <= 5; i++) {
// RES.getResAsync("guideTxt" + i + "_png")
// }
......
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="247" 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"/>
......@@ -46,6 +46,7 @@
<e:Image id="progressmask2" y="9.14" x="16" source="mask2_png" width="444" height="60" scaleX="1" visible="false"/>
</e:Group>
</e:Group>
<e:BitmapLabel width="20" height="20" x="531" y="132"/>
......
<?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">
......
......@@ -435,8 +435,8 @@ export default class MainScene extends Scene {
initUi() {
//第几关
var chapterTxt = new ChapterNum();
chapterTxt.num = this.chapter >> 0;
chapterTxt.x = 122;
chapterTxt.num = `第${this.chapter}关` // >> 0;
chapterTxt.x = 500;
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;
PanelCtrl.instance.show('scratch', data);
});
// 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);
const data = Utils.deepClone(res.data);
data.mv = mv;
PanelCtrl.instance.show('scratch', data);
});
// PanelCtrl.instance.show('scratch', res.data);
// 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);
PanelCtrl.instance.show('scratch', data);
break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口
try {
......
/**
* 位图数字,单个
*/
......@@ -11,14 +10,15 @@ export class BitmapNumber extends egret.Bitmap {
/**
* 数字0到9
*/
private _num: number;
get num(): number {
private _num: number | string;
get num(): number | string {
return this._num
}
set num(value: number) {
if (value == this._num) return;
set num(value: number | string) {
if(value == this._num) return;
this._num = value;
var texture: egret.Texture = RES.getRes(this.resName + value+"_png");
var texture: egret.Texture = RES.getRes(this.resName + value + "_png");
this.texture = texture;
}
......
......@@ -12,23 +12,38 @@ export class ChapterNum extends egret.DisplayObjectContainer {
/**
* 数字
*/
private _num: number;
get num(): number {
private _num: string | number;
get num(): string | number {
return this._num
}
set num(value: number) {
if (value == this._num) return;
private returnTO(str: string | number) {
var length = str.toString().length;
var arr = [];
for(let i = 0; i < length; i++) {
arr[i] = str[i]
}
return arr;
}
set num(value: string | number) {
if(value == this._num) return;
this._num = value;
var arr = Tool.returnTO(value);
// var arr = Tool.returnTO(value);
var arr = this.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 +53,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);
......@@ -52,7 +67,7 @@ export class ChapterNum extends egret.DisplayObjectContainer {
constructor() {
super();
this.num = 0;
this.num = '0';
}
/**
......@@ -60,11 +75,18 @@ export class ChapterNum extends egret.DisplayObjectContainer {
*/
center() {
//按顺序排,从右到左,
var len = this.$children.length;
var w = this.$children[0]["texture"].textureWidth-2;
var right = len / 2 * w - w;
for (var i = 0; i < this.$children.length; i++) {
this.$children[i].x = right - w * i;
}
let _x = 0;
this.$children.forEach((v) => {
v.x = _x;
_x += v.width;
});
// var len = this.$children.length;
// var w = this.$children[0]["texture"].textureWidth - 2;
// var right = len / 2 * w - w;
// for(var i = 0; i < this.$children.length; i++) {
// this.$children[i].x = right - w * i;
// }
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@ import { TargetNumber } from "./TargetNumber";
/**
* 通关目标是元素时的单个元素的ui
*
*
*/
export class ElementTarget extends egret.DisplayObjectContainer {
/**
......@@ -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