Commit bc9290ef authored by wildfirecode's avatar wildfirecode

1

parent 98fe2e2e
...@@ -20,5 +20,15 @@ ...@@ -20,5 +20,15 @@
"value": "积分不足 \\n 多赚点再来吧" "value": "积分不足 \\n 多赚点再来吧"
} }
] ]
},
"166f84e4ed7": {
"backgroundType": "null",
"useBgImage": true,
"useBgColor": true,
"backgroundX": 0,
"backgroundY": 0,
"backgroundWidth": -1,
"backgroundHeight": -1,
"backgroundAlpha": 100
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -20,7 +20,6 @@ export default class StartSceneBase extends Scene { ...@@ -20,7 +20,6 @@ export default class StartSceneBase extends Scene {
countTxt: eui.Label; countTxt: eui.Label;
exemptionTxt: eui.Label; exemptionTxt: eui.Label;
bg: eui.Image;
_timer: egret.Timer; _timer: egret.Timer;
async start(data?) { async start(data?) {
...@@ -29,10 +28,14 @@ export default class StartSceneBase extends Scene { ...@@ -29,10 +28,14 @@ export default class StartSceneBase extends Scene {
this.updateExemptionTxt(); this.updateExemptionTxt();
this.showElements(); this.showElements();
this.autoStart(); this.autoStart();
this.addEventListener(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
} }
autoStart() { autoStart() {
const n = 15; const n = 9999;
const timer = new egret.Timer(1000, n); const timer = new egret.Timer(1000, n);
timer.addEventListener(egret.TimerEvent.TIMER, () => { timer.addEventListener(egret.TimerEvent.TIMER, () => {
this.updateCountdownTxt(n - timer.currentCount); this.updateCountdownTxt(n - timer.currentCount);
...@@ -50,7 +53,7 @@ export default class StartSceneBase extends Scene { ...@@ -50,7 +53,7 @@ export default class StartSceneBase extends Scene {
} }
showElements() { showElements() {
const btns = [this.bg, this.ruleBtn, this.optionBtn, this.recordBtn, this.rankBtn]; const btns = [this.ruleBtn, this.optionBtn, this.recordBtn, this.rankBtn];
btns.forEach(btn => { btns.forEach(btn => {
egret.Tween.get(btn).set({ alpha: 0 }).to({ alpha: 1 }, 700, egret.Ease.backOut); egret.Tween.get(btn).set({ alpha: 0 }).to({ alpha: 1 }, 700, egret.Ease.backOut);
}) })
...@@ -137,7 +140,7 @@ export default class StartSceneBase extends Scene { ...@@ -137,7 +140,7 @@ export default class StartSceneBase extends Scene {
} }
private stopTimer() { private stopTimer() {
this._timer.stop(); this._timer.stop();
egret.Tween.get(this.countdownTxt).to({ alpha:0 }, 200); egret.Tween.get(this.countdownTxt).to({ alpha: 0 }, 200);
} }
onTap_rankBtn(e: egret.Event) { onTap_rankBtn(e: egret.Event) {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StartSkin" width="750" height="1594" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="StartSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="bg" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source="startscenebg_jpg"/> <e:Group horizontalCenter="0" verticalCenter="32">
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" anchorOffsetX="152.5" anchorOffsetY="49.5" x="375" y="828"> <e:Button id="startBtn" label="" scaleX="1" scaleY="1" anchorOffsetX="152.5" anchorOffsetY="49.5" y="87" 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="start_btn_png" source.down="start_btn_png" source.disabled="start_btn_gray_png"/> <e:Image width="100%" height="100%" source="start_btn_png" source.down="start_btn_png" source.disabled="start_btn_gray_png"/>
...@@ -9,38 +9,42 @@ ...@@ -9,38 +9,42 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Label id="countTxt" text="Label" width="100%" verticalAlign="middle" textAlign="center" y="901" horizontalCenter="0"/> <e:Label id="countTxt" text="1/1" width="100%" verticalAlign="middle" textAlign="center" y="144" horizontalCenter="0"/>
<e:Label id="countdownTxt" text="" width="100%" verticalAlign="middle" textAlign="center" y="729" horizontalCenter="0"/> <e:Label id="countdownTxt" text="00:00:00" width="100%" verticalAlign="middle" textAlign="center" y="0" horizontalCenter="0"/>
<e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="100%" horizontalCenter="0" bottom="5" verticalAlign="middle" textAlign="center" textColor="0x333333" size="18"/> </e:Group>
<e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="100%" horizontalCenter="0" bottom="5"
verticalAlign="middle" textAlign="center" textColor="0x333333" size="18" />
<e:Button id="recordBtn" label="奖品记录" y="16" scaleX="1" scaleY="1" right="23"> <e:Button id="recordBtn" label="奖品记录" y="16" scaleX="1" scaleY="1" right="23">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/> <e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png"
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/> source.disabled="recordbtn_png" />
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26" />
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="optionBtn" label="奖品预览" y="16" scaleX="1" scaleY="1" horizontalCenter="0"> <e:Button id="optionBtn" label="奖品预览" y="16" scaleX="1" scaleY="1" 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="optionBtn_png" source.down="optionBtn_png" source.disabled="optionBtn_png"/> <e:Image width="100%" height="100%" source="optionBtn_png" source.down="optionBtn_png"
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/> source.disabled="optionBtn_png" />
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26" />
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="ruleBtn" label="规则" y="16" scaleX="1" scaleY="1" left="30"> <e:Button id="ruleBtn" label="规则" y="16" scaleX="1" scaleY="1" left="30">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="ruleBtn_png" source.down="ruleBtn_png" source.disabled="ruleBtn_png"/> <e:Image width="100%" height="100%" source="ruleBtn_png" source.down="ruleBtn_png" source.disabled="ruleBtn_png" />
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26" />
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="rankBtn" label="排行榜" y="126" scaleX="1" scaleY="1" left="26"> <e:Button id="rankBtn" label="排行榜" y="126" scaleX="1" scaleY="1" left="26">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="rankBtn_png" source.down="rankBtn_png" source.disabled="rankBtn_png"/> <e:Image width="100%" height="100%" source="rankBtn_png" source.down="rankBtn_png" source.disabled="rankBtn_png" />
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26" />
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
......
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