Commit f8017ecd authored by wildfirecode's avatar wildfirecode

1

parent 8d5d242c
......@@ -18,11 +18,20 @@ export default class StartSceneBase extends Scene {
countTxt: eui.Label;
exemptionTxt: eui.Label;
bg: eui.Image;
async start(data?) {
this.startBtn.visible = false;
this.updateGetInfoView();
this.updateExemptionTxt();
this.showElements();
}
showElements() {
const btns = [this.bg, this.ruleBtn, this.optionBtn, this.recordBtn, this.rankBtn];
btns.forEach(btn => {
egret.Tween.get(btn).set({ alpha: 0 }).to({ alpha: 1 }, 700, egret.Ease.backOut);
})
}
private updateGetInfoView() {
......@@ -38,12 +47,15 @@ export default class StartSceneBase extends Scene {
if (this.startBtn) {
this.startBtn.visible = true;
this.startBtn.enabled = getStartBtnEnable();
egret.Tween.get(this.startBtn).set({ horizontalCenter: 750 }).to({ horizontalCenter: 0 }, 400, egret.Ease.elasticOut);
}
}
updateCountTxt() {
if (this.countTxt)
if (this.countTxt) {
this.countTxt.text = getCountTxt();
egret.Tween.get(this.countTxt).set({ horizontalCenter: 750 }).wait(400).to({ horizontalCenter: 0 }, 300, egret.Ease.backOut);
}
}
updateExemptionTxt() {
......@@ -93,5 +105,5 @@ export default class StartSceneBase extends Scene {
PanelCtrl.instance.show(ModuleTypes.RANK_PANEL);
}
get skinKey() { return 'Start' }
get skinKey() { return 'Start' }
}
\ No newline at end of file
......@@ -22,8 +22,10 @@ class Layers extends eui.UILayer {
}
removeFirstBackground(): any {
this._bottomLayer.removeChild(this._bg);
this._bg = null;
egret.Tween.get(this._bg).to({ alpha: 0 }, 700).call(() => {
this._bottomLayer.removeChild(this._bg);
this._bg = null;
})
}
get topLayer() { return this._topLayer }
......
<?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:Image scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source="bg_jpg"/>
<e:Image id="bg" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source="bg_jpg"/>
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" y="780" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
......
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