Commit 0272412f authored by wildfirecode's avatar wildfirecode

1

parent 664b3826
...@@ -67,6 +67,7 @@ import HbPrize from "../../src/panels/HongbaoRain/HbPrize"; ...@@ -67,6 +67,7 @@ import HbPrize from "../../src/panels/HongbaoRain/HbPrize";
import HbNoPrize from "../../src/panels/HongbaoRain/HbNoPrize"; import HbNoPrize from "../../src/panels/HongbaoRain/HbNoPrize";
import HbGame from "../../src/panels/HongbaoRain/HbGame"; import HbGame from "../../src/panels/HongbaoRain/HbGame";
import getRedBombAward from "../../src/getRedBombAward"; import getRedBombAward from "../../src/getRedBombAward";
import BombTipsPanel from "../../src/panels/BombTipsPanel";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -123,6 +124,7 @@ export default class MainBase extends eui.UILayer { ...@@ -123,6 +124,7 @@ export default class MainBase extends eui.UILayer {
['HbGame', { cls: HbGame }], ['HbGame', { cls: HbGame }],
['friend', { cls: FriendPanel }], ['friend', { cls: FriendPanel }],
['ad', { cls: ADPanel }], ['ad', { cls: ADPanel }],
['BombTipsPanel', { cls: BombTipsPanel }],
]; ];
const scenes = [ const scenes = [
......
...@@ -33,7 +33,7 @@ export default class PanelCtrl { ...@@ -33,7 +33,7 @@ export default class PanelCtrl {
} }
private _parent: egret.Sprite; private _parent: egret.Sprite;
private _mask: egret.Sprite; _mask: egret.Sprite;
static _instance: PanelCtrl; static _instance: PanelCtrl;
static get instance() { static get instance() {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl()) return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())
......
...@@ -195,6 +195,10 @@ ...@@ -195,6 +195,10 @@
{ {
"keys": "hbRule_bg_png", "keys": "hbRule_bg_png",
"name": "hbrule" "name": "hbrule"
},
{
"name": "preload",
"keys": "redbagtips_ele_png,redbagtips_ele1_png,redbagtips_ele2_png,redbagtips_ele3_png,redbagtips_light_png,redbagtips按钮_png,redbagtips活动规则_png,redbagtipsbg_png,redbagtips_ele7_png"
} }
], ],
"resources": [ "resources": [
...@@ -3282,6 +3286,51 @@ ...@@ -3282,6 +3286,51 @@
"url": "assets/hbCutTime/hbCutTime_btn_null.png", "url": "assets/hbCutTime/hbCutTime_btn_null.png",
"type": "image", "type": "image",
"name": "hbCutTime_btn_null_png" "name": "hbCutTime_btn_null_png"
},
{
"name": "redbagtips_ele_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_ele.png"
},
{
"name": "redbagtips_ele1_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_ele1.png"
},
{
"name": "redbagtips_ele2_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_ele2.png"
},
{
"name": "redbagtips_ele3_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_ele3.png"
},
{
"name": "redbagtips_light_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_light.png"
},
{
"name": "redbagtips按钮_png",
"type": "image",
"url": "assets/redbombtips/redbagtips按钮.png"
},
{
"name": "redbagtips活动规则_png",
"type": "image",
"url": "assets/redbombtips/redbagtips活动规则.png"
},
{
"name": "redbagtipsbg_png",
"type": "image",
"url": "assets/redbombtips/redbagtipsbg.png"
},
{
"name": "redbagtips_ele7_png",
"type": "image",
"url": "assets/redbombtips/redbagtips_ele7.png"
} }
] ]
} }
\ No newline at end of file
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
"resource/skins/TaskSkin.exml", "resource/skins/TaskSkin.exml",
"resource/skins/Toast2Skin.exml", "resource/skins/Toast2Skin.exml",
"resource/skins/ToastSkin.exml", "resource/skins/ToastSkin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/TurnRuleSkin.exml", "resource/skins/TurnRuleSkin.exml",
"resource/skins/TurntableNoPrizeSkin.exml", "resource/skins/TurntableNoPrizeSkin.exml",
"resource/skins/TurntablePrize2Skin.exml", "resource/skins/TurntablePrize2Skin.exml",
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombTipsSkin" width="400" height="300" xmlns:e="http://ns.egret.com/eui"> <e:Skin class="RedBombTipsSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="light" source="redbagtips_light_png" y="459" horizontalCenter="0.5" anchorOffsetX="348" anchorOffsetY="358"/>
<e:Image id="bg" source="redbagtipsbg_png" y="32" horizontalCenter="0"/>
<e:Image id="ele1" source="redbagtips_ele3_png" x="574" y="332"/>
<e:Image id="ele2" source="redbagtips_ele2_png" x="554" y="264"/>
<e:Image id="ele3" source="redbagtips_ele1_png" x="160" y="56"/>
<e:Image id="ele4" source="redbagtips_ele_png" x="134" y="490"/>
<e:Image id="redbag" source="redbagtips_ele7_png" y="432" x="376" anchorOffsetX="192" anchorOffsetY="108"/>
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0.5"/>
<e:Button id="btn" label="" y="692" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="redbagtips按钮_png" source.down="redbagtips按钮_png" source.disabled="redbagtips按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -544,7 +544,7 @@ export default class MapScene extends Scene { ...@@ -544,7 +544,7 @@ export default class MapScene extends Scene {
localStorage.setItem('activityguide','1'); localStorage.setItem('activityguide','1');
} }
onTap_act2btn() { onTap_act2btn() {
PanelCtrl.instance.show("HbCutTime"); PanelCtrl.instance.show("BombTipsPanel");
this.onTap_actsShowBtn(); this.onTap_actsShowBtn();
} }
......
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
export default class BombTipsPanel extends Panel {
start(data) {
super.start();
this.showlog();
egret.Tween.get(this['light'], { loop: true }).to({ rotation: 360 }, 8000);
egret.Tween.get(this['ele2'], { loop: true }).to({ x: this['ele2'].x + 30, y: this['ele2'].y - 30 }, 1000)
.to({ x: this['ele2'].x, y: this['ele2'].y }, 1000);
egret.Tween.get(this['ele1'], { loop: true }).to({ x: this['ele1'].x + 30, y: this['ele1'].y - 30 }, 1000)
.to({ x: this['ele1'].x, y: this['ele1'].y }, 1000);
egret.Tween.get(this['ele3'], { loop: true }).to({ x: this['ele3'].x - 30, y: this['ele3'].y - 30 }, 1000)
.to({ x: this['ele3'].x, y: this['ele3'].y }, 1000);
egret.Tween.get(this['ele4'], { loop: true }).to({ x: this['ele4'].x - 30, y: this['ele4'].y + 30 }, 1000)
.to({ x: this['ele4'].x, y: this['ele4'].y }, 1000);
}
showlog() {
}
initEvents() {
super.initEvents();
this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
onTapInvite() {
const eles = ['btn', 'rulebtn', 'bg', 'ele1', 'ele2', 'ele3', 'ele4', 'light'];
const dur = 500;
eles.forEach((e, index) => {
// if (index == 0)
// egret.Tween.get(this[e]).to({ alpha: 0 }, dur).call(() => {
// });
// else
egret.Tween.get(this[e]).to({ alpha: 0 }, dur);
});
const mask = PanelCtrl.instance._mask;
egret.Tween.get(mask).to({ alpha: 0 }, dur);
egret.Tween.get(this['redbag']).to({ scaleX: 0.7, scaleY: 0.7 }, 200)
.to({ scaleX: 1.5, scaleY: 1.5, alpha: 0 }, 200);
//隐藏之后mask恢复alpha
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'RedBombTips' }
}
\ 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