Commit ebb29f80 authored by 邱旭's avatar 邱旭

1

parent 7c9156b3
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
"name": "turntableprize" "name": "turntableprize"
}, },
{ {
"keys": "hbCutTimeFont_fnt,hbCutTimeFont_png,hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png", "keys": "hbCutTimeFont_fnt,hbCutTimeFont_png,hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png,hbCutTime_rule_btn_png",
"name": "hbcuttime" "name": "hbcuttime"
}, },
{ {
...@@ -3242,6 +3242,11 @@ ...@@ -3242,6 +3242,11 @@
"url": "assets/hbGame/hbGameScoreFont.png", "url": "assets/hbGame/hbGameScoreFont.png",
"type": "image", "type": "image",
"name": "hbGameScoreFont_png" "name": "hbGameScoreFont_png"
},
{
"url": "assets/hbCutTime/hbCutTime_rule_btn.png",
"type": "image",
"name": "hbCutTime_rule_btn_png"
} }
] ]
} }
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="ok_btn" label="" y="692" anchorOffsetX="150" anchorOffsetY="48" horizontalCenter="0"> <e:Button id="ok_btn" label="" y="668" anchorOffsetX="150" anchorOffsetY="48" horizontalCenter="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="hbCutTime_btn_enable_png" source.down="hbCutTime_btn_enable_png" source.disabled="hbCutTime_btn_disable_png"/> <e:Image width="100%" height="100%" source="hbCutTime_btn_enable_png" source.down="hbCutTime_btn_enable_png" source.disabled="hbCutTime_btn_disable_png"/>
...@@ -21,4 +21,12 @@ ...@@ -21,4 +21,12 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="rule_btn" label="" y="740" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="hbCutTime_rule_btn_png" source.down="hbCutTime_rule_btn_png" source.disabled="hbCutTime_rule_btn_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
...@@ -11,8 +11,11 @@ ...@@ -11,8 +11,11 @@
<e:Image y="30" source="hbGame_CutTime_progress_png" horizontalCenter="-0.5"/> <e:Image y="30" source="hbGame_CutTime_progress_png" horizontalCenter="-0.5"/>
<e:BitmapLabel id="cutTimeLabel" y="65" text="60" font="hbGameCutTimeFont_fnt" horizontalCenter="0"/> <e:BitmapLabel id="cutTimeLabel" y="65" text="60" font="hbGameCutTimeFont_fnt" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Group id="readyGroup" y="310.5" horizontalCenter="0" width="560" height="500"> <e:Group id="readyGroup" y="310.5" horizontalCenter="0" width="560" height="710" anchorOffsetY="0">
<e:Image id="readyTips" y="0" horizontalCenter="0" source="hbGame_tips_png"/> <e:Label id="tipLabel" text="抢到15个红包才有奖励哦~" y="480" fontFamily="FZY3JW" horizontalCenter="0"/>
<e:Image id="readyCutTime" y="118" horizontalCenter="0" x="10" source="hbGame_1_png"/> <e:Label text="点击所有动物均可累积双份红包" y="520" fontFamily="FZY3JW" horizontalCenter="0"/>
<e:Image y="566" source="hbGame_lion_touch_png" horizontalCenter="-37.5"/>
<e:Image y="597" source="hbGame_+2_png" horizontalCenter="82"/>
<e:Image id="readyCutTime" y="95" horizontalCenter="0" x="10" source="hbGame_1_png"/>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -6,10 +6,11 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; ...@@ -6,10 +6,11 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
* 红包雨倒计时 * 红包雨倒计时
*/ */
export default class HbCutTime extends Panel { export default class HbCutTime extends Panel {
public cutTimeLabel: eui.BitmapLabel; public cutTimeLabel:eui.BitmapLabel;
public cutTime: eui.Image; public cutTime:eui.Image;
public closeBtn: eui.Button; public closeBtn:eui.Button;
public ok_btn: eui.Button; public ok_btn:eui.Button;
public rule_btn:eui.Button;
private cutTimer: CutTimer = null; private cutTimer: CutTimer = null;
...@@ -38,12 +39,18 @@ export default class HbCutTime extends Panel { ...@@ -38,12 +39,18 @@ export default class HbCutTime extends Panel {
super.initEvents(); super.initEvents();
this.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this); this.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
this.ok_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this); this.ok_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this);
this.rule_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.tapRuleBtn, this);
}
private tapRuleBtn(){
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this); this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
this.ok_btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this); this.ok_btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this);
this.rule_btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.tapRuleBtn, this);
} }
onTouchTap_closeBtn() { onTouchTap_closeBtn() {
......
...@@ -2,18 +2,19 @@ import Panel from "../../../libs/new_wx/components/Panel"; ...@@ -2,18 +2,19 @@ import Panel from "../../../libs/new_wx/components/Panel";
import RainMgr from "./RainMgr"; import RainMgr from "./RainMgr";
import CutTimer from "../../CutTimer"; import CutTimer from "../../CutTimer";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher"; import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser";
/** /**
* 红包雨主游戏 * 红包雨主游戏
*/ */
export default class HbGame extends Panel { export default class HbGame extends Panel {
public rainGroup: eui.Group; public rainGroup:eui.Group;
public scoreGroup: eui.Group; public scoreGroup:eui.Group;
public scoreLabel: eui.BitmapLabel; public scoreLabel:eui.BitmapLabel;
public cutTimeLabel: eui.BitmapLabel; public cutTimeLabel:eui.BitmapLabel;
public readyGroup: eui.Group; public readyGroup:eui.Group;
public readyTips: eui.Image; public readyCutTime:eui.Image;
public readyCutTime: eui.Image; public tipLabel:eui.Label;
private rainMgr: RainMgr = null; private rainMgr: RainMgr = null;
private cutTime: egret.Timer = null; private cutTime: egret.Timer = null;
...@@ -35,6 +36,8 @@ export default class HbGame extends Panel { ...@@ -35,6 +36,8 @@ export default class HbGame extends Panel {
initUI() { initUI() {
this.rainGroup.height = this.width / window.innerWidth * window.innerHeight; this.rainGroup.height = this.width / window.innerWidth * window.innerHeight;
this.tipLabel.textFlow = (new HtmlTextParser).parser(`抢到<b>${15}</b>个红包才有奖励哦~`);
this.time = 60; this.time = 60;
this.cutTimeLabel.text =`${this.time}` this.cutTimeLabel.text =`${this.time}`
} }
...@@ -100,8 +103,8 @@ export default class HbGame extends Panel { ...@@ -100,8 +103,8 @@ export default class HbGame extends Panel {
} }
private readyTipsEffect() { private readyTipsEffect() {
this.readyTips.alpha = 0; this.readyGroup.alpha = 0;
egret.Tween.get(this.readyTips).to({alpha: 1}, 300).call(() => this.readyTimeEffect()); egret.Tween.get(this.readyGroup).to({alpha: 1}, 300).call(() => this.readyTimeEffect());
} }
protected onSkinComplete() { protected onSkinComplete() {
......
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