Commit ad23ece5 authored by wjf's avatar wjf

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

parents 40121cb0 9a127ddd
......@@ -141,7 +141,7 @@
"name": "scratchrulepanel"
},
{
"keys": "bagbtn我的奖券_png,bagbtn我的道具_png,bag我的奖券_png,bag我的道具_png,bag_item_bg2_png,bag_item_bg_png,bag_icon3_png,bag_icon2_png,bag_icon1_png,bag按钮 副本 9_png",
"keys": "bagbtn我的奖券_png,bagbtn我的道具_png,bag我的奖券_png,bag我的道具_png,bag_item_bg2_png,bag_item_bg_png,bag_icon3_png,bag_icon2_png,bag_icon1_png,bag按钮 副本 9_png,bag按钮 副本 10_png",
"name": "bag"
},
{
......@@ -2554,6 +2554,11 @@
"url": "assets/bagquit/bag退出按钮.png",
"type": "image",
"name": "bag退出按钮_png"
},
{
"url": "assets/bag/bag按钮 副本 10.png",
"type": "image",
"name": "bag按钮 副本 10_png"
}
]
}
\ No newline at end of file
......@@ -8,6 +8,8 @@
"resource/skins/AvatarSkin.exml",
"resource/skins/BackSkin.exml",
"resource/skins/BagSkin.exml",
"resource/skins/BagItemSkin.exml",
"resource/skins/BagSkin.exml",
"resource/skins/Blood2Skin.exml",
"resource/skins/BloodSkin.exml",
"resource/skins/Box2Skin.exml",
......@@ -67,6 +69,7 @@
"resource/skins/TaskPrizeSkin.exml",
"resource/skins/TaskSkin.exml",
"resource/skins/ToastSkin.exml",
"resource/skins/TurntablePanelSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BagItemSkin" width="400" height="300" xmlns:e="http://ns.egret.com/eui">
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BagQuitSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui">
<e:Image source="bag退出弹窗_png" y="211" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="611.94" y="201.92">
<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:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button label="" x="158" y="476">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="bag退出按钮_png" source.down="bag退出按钮_png" source.disabled="bag退出按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button label="" x="473.44" y="546.5">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="bag继续按钮_png" source.down="bag继续按钮_png" source.disabled="bag继续按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image scaleX="1" scaleY="1" y="73.35" horizontalCenter="0" source=""/>
<e:Group horizontalCenter="0" verticalCenter="-190" touchEnabled="false">
<e:Image scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source=""/>
<e:Group id="panel" anchorOffsetX="277" anchorOffsetY="276.5" rotation="0" horizontalCenter="0" verticalCenter="0">
<e:Image scaleX="1" scaleY="1" anchorOffsetX="277" anchorOffsetY="276.5" rotation="0" horizontalCenter="0" verticalCenter="0" source=""/>
<e:Group id="prize0" y="14.28" x="202">
<e:Image id="img0" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab0" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xe33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize1" y="124.33" rotation="-40" x="51">
<e:Image id="img1" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab1" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize2" y="305.71" rotation="-80" x="7">
<e:Image id="img2" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab2" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize3" y="472.4" rotation="-120" x="88">
<e:Image id="img3" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab3" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize4" y="547.74" rotation="-160" x="258">
<e:Image id="img4" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab4" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize5" y="496.44" rotation="-200" x="438">
<e:Image id="img5" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab5" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize6" y="342.33" rotation="-240" x="540.33">
<e:Image id="img6" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab6" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize7" y="157.32" rotation="-280" x="520.6">
<e:Image id="img7" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab7" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
<e:Group id="prize8" y="27.91" rotation="-320" x="388.98">
<e:Image id="img8" y="50" width="83" height="83" rotation="0" horizontalCenter="0"/>
<e:Label id="lab8" text="Label" y="0" size="24" rotation="0" textAlign="center" verticalAlign="middle" anchorOffsetX="75" width="150" anchorOffsetY="0" height="50" skewX="0" textColor="0xE33330" horizontalCenter="0"/>
</e:Group>
</e:Group>
<e:Button id="start_btn" label="" anchorOffsetX="93" anchorOffsetY="140" horizontalCenter="0" verticalCenter="-25">
</e:Button>
</e:Group>
<e:Button id="closeBtn" label="" y="295.91" x="611">
<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"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
......@@ -2,7 +2,7 @@
* 简单的倒计时
* 2019.10.24
*/
export default class CutTime {
export default class CutTimer {
private _timer: egret.Timer = null;
private _label: eui.Label = null;
......
......@@ -65,7 +65,7 @@ export default class MapScene extends Scene {
}
// 邀请有礼角标倒计时
private timer: egret.Timer;
private inviteTimer: egret.Timer;
private cutTime: number;
async start(data?) {
......@@ -294,6 +294,10 @@ export default class MapScene extends Scene {
if(this['pic'])
egret.Tween.removeTweens(this['pic']);
if(this.inviteTimer){
this.inviteTimer.stop();
this.inviteTimer.removeEventListener(egret.TimerEvent.TIMER, this.inviteCutTimer, this);
}
}
getScrollV(lastOrder, stageHeight) {
......@@ -542,8 +546,8 @@ export default class MapScene extends Scene {
return;
}
let flag = res.data.completeFlag;
if(this.timer) {
this.timer.stop();
if(this.inviteTimer) {
this.inviteTimer.stop();
}
switch(true) {
case (flag == 0): // 未完成 显示倒计时
......@@ -551,10 +555,10 @@ export default class MapScene extends Scene {
this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true;
this.cutTime = res.data.endTime - res.data.sysTime + 5000;
this.timer = new egret.Timer(1000, 0);
this.timer.addEventListener(egret.TimerEvent.TIMER, this.cutTimer, this);
this.timer.start();
this.cutTimer();
this.inviteTimer = new egret.Timer(1000, 0);
this.inviteTimer.addEventListener(egret.TimerEvent.TIMER, this.inviteCutTimer, this);
this.inviteTimer.start();
this.inviteCutTimer();
break;
case (flag == 1): // 完成未开奖 待领奖 显示待领奖
this["inviteGroup"].visible = true;
......@@ -590,12 +594,12 @@ export default class MapScene extends Scene {
// 倒计时
private cutTimer() {
private inviteCutTimer() {
let timer = this.convertTime(this.cutTime -= 1000);
if(timer.hour === "00"
&& timer.min === "00"
&& timer.sec === "00") {
this.timer.stop();
this.inviteTimer.stop();
GDispatcher.dispatchEvent("getInviteInfo");
}
this["inviteTips"].text = `${timer.hour}:${timer.min}:${timer.sec}`;
......@@ -642,7 +646,7 @@ export default class MapScene extends Scene {
////////////////////////////////////////////////// 大转盘 //////////////////////////////////////////////////
onTap_turnTableBtn() {
console.log("onTapTurnTable");
}
protected initEvents() {
......
......@@ -184,6 +184,14 @@ export default class InvitePanel extends Panel {
return 'Invite'
}
destroy() {
super.destroy();
if(this.timer){
this.timer.stop();
this.timer.removeEventListener(egret.TimerEvent.TIMER, this.cutTimer, this);
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -5,11 +5,11 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import { iswx } from "../iswx";
import Utils from "../Utils";
import ScratchRulePanel from "./ScratchRulePanel";
import CutTime from "../CutTime";
import CutTimer from "../CutTimer";
export default class ScratchPanel extends Panel {
private invite_img: egret.Texture;
private cutTimer: CutTime;
private cutTimer: CutTimer;
constructor(data) {
super();
......@@ -122,11 +122,11 @@ export default class ScratchPanel extends Panel {
this["list"].dataProvider = new eui.ArrayCollection(this.data.invitationUser);
// 倒计时
this.cutTimer = new CutTime(this["cutTimeLabel"], "将在hh:mm:ss后消失", () => {
this.cutTimer = new CutTimer(this["cutTimeLabel"], "将在hh:mm:ss后消失", () => {
this.hidePanel();
}
);
let cutTime = this.data.endTime - this.data.sysTime + 5000;
let cutTime = this.data.endTime - this.data.sysTime + 3000;
if(!this.cutTimer.start(cutTime)) {
this.cutTimer.stop();
this.cutTimer.start(cutTime);
......@@ -167,6 +167,11 @@ export default class ScratchPanel extends Panel {
});
}
destroy() {
super.destroy();
this.cutTimer.stop();
}
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
......
......@@ -7,7 +7,7 @@
"invitationId": "活动id",
"invitationCount": 5,
"img": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg",
"sysTime": 1570673805000,
"sysTime": 1570673808000,
"endTime": 1570673810000,
"invitationUser": [
{
......
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