Commit 6e4d4900 authored by 邱旭's avatar 邱旭

1

parent dcdfb1dc
<?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"/>
<e:Rect id="rectbg" width="750" height="1206" visible="false"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true">
<e:Group id="scrollGroup">
</e:Group>
......@@ -150,7 +150,7 @@
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159" visible="false"/>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image source="maphot_png" x="91.52" y="15.72" touchEnabled="false"/>
<e:Image id="actTips" source="maphot_png" x="91.52" y="15.72"/>
</e:Group>
<e:Group id="settingsx" x="30" scaleX="1.4" scaleY="1.4" bottom="23" locked="true">
<e:Group id="settingGroup" x="2" y="6.08" visible="false">
......
......@@ -46,7 +46,7 @@ export default class MapScene extends Scene {
_data;
private icons = {};
private actIcon:ActIcon = null;
private actIcon: ActIcon = null;
sendInvite() {
const code = Utils.getRequestByKey('shareCode');
......@@ -112,7 +112,7 @@ export default class MapScene extends Scene {
async start(data?) {
super.start();
// PanelCtrl.instance.show('RedBombAlert');
// PanelCtrl.instance.show('RedBombAlert');
// NetManager.ins.hc_submit(()=>{
// // const submitData = DataManager.ins.getData('hc_submit').data;
// // PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL,{ level:1, option: submitData.option })
......@@ -325,7 +325,7 @@ export default class MapScene extends Scene {
"turntableIcon": new TurntableIcon("turntableIcon", this["turnTableGroup"], this["turnTableBtn"], this["turnTableTipsBg"], this["turnTableTips"]),
};
this.actIcon = new ActIcon(this['actsShowBtn'], this['actIconsGroup']);
this.actIcon = new ActIcon(this['actsShowBtn'], this['actTips'], this['actIconsGroup']);
this.actIcon.addActIcon("hbRainIcon", new HbRainIcon("hbRainIcon", this["hbRainGroup"], this["hbRainBtn"]));
}
......
......@@ -3,13 +3,15 @@ import IconBase from "./IconBase";
export default class ActIcon {
private actIconsGroup;
private actsShowBtn;
private actTips;
private actIconsGroup;
private icons = {};
constructor(actsShowBtn, actIconGroup) {
constructor(actsShowBtn, actTips, actIconGroup) {
this.actsShowBtn = actsShowBtn;
this.actTips = actTips;
this.actIconsGroup = actIconGroup;
this.initUI();
this.initEvents();
......@@ -19,15 +21,15 @@ export default class ActIcon {
this.icons[name] = actIcon;
}
public removeActIcon(name:string){
if(this.icons[name]){
public removeActIcon(name: string) {
if(this.icons[name]) {
this.icons[name].destory();
delete this.icons[name];
}
}
public destory() {
for(let k in this.icons){
for(let k in this.icons) {
this.removeActIcon(this.icons[k]);
}
this.removeEvents();
......@@ -37,9 +39,9 @@ export default class ActIcon {
this.actIconsGroup.x = -999;
}
private updateActIcon(){
for(let k in this.icons){
if(this.icons[k].visible){
private updateActIcon() {
for(let k in this.icons) {
if(this.icons[k].visible) {
this.visible = true;
return;
}
......@@ -47,7 +49,7 @@ export default class ActIcon {
this.visible = false;
}
public set visible(visible:boolean){
public set visible(visible: boolean) {
this.actsShowBtn.visible = visible;
this.actIconsGroup.visible = visible;
}
......
{
"success": true,
"code": "0000000000",
"data": {
"canJoin": true,
"currentRemainTimes": 1,
"currentSession": {
"endTime": 157292106000,
"sessionIndex": 1,
"limitScore": 10,
"startTime": 157292105000
},
"nextSession": {
"endTime": 157292106000,
"sessionIndex": 2,
"limitScore": 66,
"startTime": 157292105000
}
},
"desc": "OK",
"success": true,
"timestamp": 157292100000
"timestamp": 1573131493110,
"data": {
"currentSession": null,
"currentRemainTimes": 0,
"nextSession": null,
"canJoin": false
}
}
\ 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