Commit ba22480b authored by haiyoucuv's avatar haiyoucuv

init

parent 687887b5
......@@ -33,17 +33,17 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/index-BgzNJgbj.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/vendor-BQeg0qjm.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/index-CGOfNeU3.css">
<script type="module" crossorigin src="./assets/index-C9BDrz-q.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747212563745/assets/vendor-Dulh-I3m.js">
<link rel="stylesheet" crossorigin href="./assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747212563745/assets/index-X2kXvCpX.css">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
<body>
<div id="root"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1747188967194/assets/index-legacy-Tn0Un0ZG.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-gk8j6KLl.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......@@ -14,7 +14,7 @@ export default [
actEndTime: Date.now() + 1000000,
currentTime: Date.now(),
guideFlag: false,
currentStoreNum: 123,
currentStoreNum: 923,
storeLimitNum: 2222,
continueSignDays: 3,
todaySignFlag: false,
......
......@@ -25,7 +25,7 @@ export class Game extends Base {
fullAni.anchor.set(0.5);
fullAni.position.set(375, 553);
fullAni.loop = false;
fullAni.play();
// fullAni.play();
const dropAni = this.dropAni = this.addChild(new GifSprite({ source: Assets.get("撒金币.gif") }));
dropAni.anchor.set(0.5);
......@@ -48,16 +48,34 @@ export class Game extends Base {
playTo(progress: number) {
progress = Math.min(Math.max(progress, 0), 1);
const nowFrame = this.fullAni.currentFrame;
const targetFrame = Math.floor(this.fullAni.totalFrames * progress);
if (nowFrame > targetFrame) {
this.fullAni.animationSpeed = -1;
} else {
this.fullAni.animationSpeed = 1;
}
this.fullAni.play();
this.fullAni.onFrameChange = (currentFrame) => {
if (currentFrame === targetFrame) {
this.fullAni.animationSpeed = 1;
this.fullAni.onFrameChange = null;
this.fullAni.stop();
}
};
}
@reactor(() => store.indexData.currentStoreNum)
onStoreNumChange(currentStoreNum: number) {
console.log("currentStoreNum", currentStoreNum)
this.playTo(currentStoreNum / store.indexData.storeLimitNum);
}
@reactor(() => store.indexData.storeLimitNum)
onStoreLimitChange(storeLimitNum: number) {
console.log("storeLimitNum", storeLimitNum)
this.playTo(store.indexData.currentStoreNum / storeLimitNum);
}
......
......@@ -37,7 +37,7 @@ export async function initBundle(): Promise<void> {
manifest: manifest,
skipDetections: true,
preferences: {
// preferWorkers: false,
preferWorkers: false,
// preferCreateImageBitmap: true,
}
});
......
......@@ -4,7 +4,9 @@ export class Base extends Container {
constructor() {
super();
this.onLoad();
setTimeout(() => {
this.onLoad();
}, 0);
}
protected onLoad() {
......
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