Commit 74138556 authored by wildfirecode's avatar wildfirecode

1

parent 02624900
const wait = async (duration: number) =>
new Promise(
resolve => setTimeout(resolve, duration)
);
export default wait
\ No newline at end of file
import getIsIOS from "../../new_tc/getIsIOS"; import getIsIOS from "../../new_tc/getIsIOS";
import wait from "../../new_tc/wait";
import doStart from "../../new_tw/ctrls/doStart"; import doStart from "../../new_tw/ctrls/doStart";
import getCountTxt from "../../new_tw/datas/getCountTxt"; import getCountTxt from "../../new_tw/datas/getCountTxt";
import getStartBtnEnable from "../../new_tw/datas/getStartBtnEnable"; import getStartBtnEnable from "../../new_tw/datas/getStartBtnEnable";
...@@ -43,11 +44,18 @@ export default class StartSceneBase extends Scene { ...@@ -43,11 +44,18 @@ export default class StartSceneBase extends Scene {
} }
} }
updateStartBtnStatus() { async updateStartBtnStatus() {
if (this.startBtn) { if (this.startBtn) {
this.startBtn.visible = true; this.startBtn.visible = true;
this.startBtn.enabled = getStartBtnEnable(); this.startBtn.enabled = getStartBtnEnable();
egret.Tween.get(this.startBtn).set({ horizontalCenter: 750 }).to({ horizontalCenter: 0 }, 400, egret.Ease.elasticOut); egret.Tween.get(this.startBtn).set({ horizontalCenter: 750 }).to({ horizontalCenter: 0 }, 400, egret.Ease.elasticOut);
await wait(500);
egret.Tween.get(this.startBtn, { loop: true })
.to({ scaleY: 1.1, scaleX: 0.9 }, 1000, egret.Ease.bounceOut)
.wait(500)
.to({ scaleY: 1, scaleX: 1 }, 1000)
.to({ scaleX: 1.1, scaleY: 0.9 }, 1000)
.to({ scaleX: 1, scaleY: 1 }, 1000);
} }
} }
...@@ -97,8 +105,12 @@ export default class StartSceneBase extends Scene { ...@@ -97,8 +105,12 @@ export default class StartSceneBase extends Scene {
onTap_recordBtn(e: egret.Event) { onTap_recordBtn(e: egret.Event) {
} }
onTap_startBtn(e: egret.Event) { async onTap_startBtn(e: egret.Event) {
egret.Tween.removeTweens(this.startBtn);
egret.Tween.get(this.startBtn).to({ horizontalCenter: 750 }, 200);
egret.Tween.get(this.countTxt).to({ horizontalCenter: -750 }, 200);
doStart(); doStart();
await wait(200);
SceneCtrl.instance.change(ModuleTypes.PALY_SCENE); SceneCtrl.instance.change(ModuleTypes.PALY_SCENE);
} }
onTap_rankBtn(e: egret.Event) { onTap_rankBtn(e: egret.Event) {
......
const centerAnchorOffset = (display: egret.DisplayObject): void => {
display.anchorOffsetX = display.width / 2;
display.anchorOffsetY = display.height / 2;
}
export default centerAnchorOffset;
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"alert","version":5,"files":["../assets/alert/alertbg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"loading","version":5,"files":["../assets/loading/bg.png","../assets/loading/progress.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"options","version":5,"files":["../assets/option/line2.png","../assets/option/prizeBg.png","../assets/option/X-1.png","../assets/option/line.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"play","version":5,"files":["../assets/playscene/testbtn.png","../assets/playscene/音乐开启.png","../assets/playscene/音乐关闭.png","../assets/playscene/轮子1.png","../assets/playscene/火箭.png","../assets/playscene/火.png","../assets/playscene/发弹雾气.png","../assets/playscene/大炮的头.png","../assets/playscene/大炮板子.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/prizePanelbg.png","../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rank","version":5,"files":["../assets/rank/userItemBg.png","../assets/rank/rankTitle.png","../assets/rank/num3.png","../assets/rank/num2.png","../assets/rank/num1.png","../assets/rank/dog.png","../assets/rank/commonPanelBg.png","../assets/rank/closeBtn.png","../assets/rank/bottomLine.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["../assets/rule/X.png","../assets/rule/ruleBg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/optionBtn.png","../assets/startScene/rankBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/ruleBtn.png","../assets/startScene/start_btn_gray.png","../assets/startScene/start_btn.png"]}
\ No newline at end of file
<?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="1594" 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:Image id="bg" scaleX="1" scaleY="1" horizontalCenter="0" verticalCenter="0" source="startscenebg_jpg"/>
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" y="780" horizontalCenter="0"> <e:Button id="startBtn" label="" scaleX="1" scaleY="1" anchorOffsetX="152.5" anchorOffsetY="49.5" x="375" y="828">
<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"/>
......
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