Commit ebb29f80 authored by 邱旭's avatar 邱旭

1

parent 7c9156b3
......@@ -177,7 +177,7 @@
"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"
},
{
......@@ -3242,6 +3242,11 @@
"url": "assets/hbGame/hbGameScoreFont.png",
"type": "image",
"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 @@
</e:Skin>
</e:skinName>
</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: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"/>
......@@ -21,4 +21,12 @@
</e:Skin>
</e:skinName>
</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>
\ No newline at end of file
......@@ -11,8 +11,11 @@
<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:Group>
<e:Group id="readyGroup" y="310.5" horizontalCenter="0" width="560" height="500">
<e:Image id="readyTips" y="0" horizontalCenter="0" source="hbGame_tips_png"/>
<e:Image id="readyCutTime" y="118" horizontalCenter="0" x="10" source="hbGame_1_png"/>
<e:Group id="readyGroup" y="310.5" horizontalCenter="0" width="560" height="710" anchorOffsetY="0">
<e:Label id="tipLabel" text="抢到15个红包才有奖励哦~" y="480" fontFamily="FZY3JW" horizontalCenter="0"/>
<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:Skin>
\ No newline at end of file
......@@ -6,10 +6,11 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
* 红包雨倒计时
*/
export default class HbCutTime extends Panel {
public cutTimeLabel: eui.BitmapLabel;
public cutTime: eui.Image;
public closeBtn: eui.Button;
public ok_btn: eui.Button;
public cutTimeLabel:eui.BitmapLabel;
public cutTime:eui.Image;
public closeBtn:eui.Button;
public ok_btn:eui.Button;
public rule_btn:eui.Button;
private cutTimer: CutTimer = null;
......@@ -38,12 +39,18 @@ export default class HbCutTime extends Panel {
super.initEvents();
this.closeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, 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() {
super.removeEvents();
this.closeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, 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() {
......
......@@ -2,18 +2,19 @@ import Panel from "../../../libs/new_wx/components/Panel";
import RainMgr from "./RainMgr";
import CutTimer from "../../CutTimer";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser";
/**
* 红包雨主游戏
*/
export default class HbGame extends Panel {
public rainGroup: eui.Group;
public scoreGroup: eui.Group;
public scoreLabel: eui.BitmapLabel;
public cutTimeLabel: eui.BitmapLabel;
public readyGroup: eui.Group;
public readyTips: eui.Image;
public readyCutTime: eui.Image;
public rainGroup:eui.Group;
public scoreGroup:eui.Group;
public scoreLabel:eui.BitmapLabel;
public cutTimeLabel:eui.BitmapLabel;
public readyGroup:eui.Group;
public readyCutTime:eui.Image;
public tipLabel:eui.Label;
private rainMgr: RainMgr = null;
private cutTime: egret.Timer = null;
......@@ -35,6 +36,8 @@ export default class HbGame extends Panel {
initUI() {
this.rainGroup.height = this.width / window.innerWidth * window.innerHeight;
this.tipLabel.textFlow = (new HtmlTextParser).parser(`抢到<b>${15}</b>个红包才有奖励哦~`);
this.time = 60;
this.cutTimeLabel.text =`${this.time}`
}
......@@ -100,8 +103,8 @@ export default class HbGame extends Panel {
}
private readyTipsEffect() {
this.readyTips.alpha = 0;
egret.Tween.get(this.readyTips).to({alpha: 1}, 300).call(() => this.readyTimeEffect());
this.readyGroup.alpha = 0;
egret.Tween.get(this.readyGroup).to({alpha: 1}, 300).call(() => this.readyTimeEffect());
}
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