Commit 0f507610 authored by cc's avatar cc
parents d59a382c ba95f7a4
......@@ -102,10 +102,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748483160861/assets/index-C1OM52Yu.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748483160861/assets/vendor-BNtg8X7V.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748483160861/assets/vendor-NZxPxbcK.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748483160861/assets/index-C7eNr-Fx.css">
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/index-CirDTnhR.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/vendor-BMFklR1D.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/vendor-NZxPxbcK.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/index-CIY6sOTV.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>
......@@ -113,8 +113,8 @@
<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/1748483160861/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748483160861/assets/index-legacy-D0cnnZoc.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748509295666/assets/index-legacy-B_5NNqQU.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
\ No newline at end of file
......@@ -11,7 +11,7 @@ export default [
"actStartTimestamp": Date.now()-42625488.007563084,
"answerChance": 666,
"rank": null,
"uid": "123213",
"uid": "00000000000",
"currentTimestamp": Date.now(),
"actEndTimestamp": Date.now()+42625488.007563084,
"avatar": "/src/assets/homePage/head.png",
......
src/assets/Game/level14/right.png

209 KB | W: | H:

src/assets/Game/level14/right.png

207 KB | W: | H:

src/assets/Game/level14/right.png
src/assets/Game/level14/right.png
src/assets/Game/level14/right.png
src/assets/Game/level14/right.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/Game/level19/img.png

390 KB | W: | H:

src/assets/Game/level19/img.png

356 KB | W: | H:

src/assets/Game/level19/img.png
src/assets/Game/level19/img.png
src/assets/Game/level19/img.png
src/assets/Game/level19/img.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/Game/level8/D.png

34.4 KB | W: | H:

src/assets/Game/level8/D.png

8.81 KB | W: | H:

src/assets/Game/level8/D.png
src/assets/Game/level8/D.png
src/assets/Game/level8/D.png
src/assets/Game/level8/D.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -48,7 +48,7 @@ export class Game extends Base {
const qsBg = this.addChild(new Sprite(Assets.get("问题.png")));
qsBg.position.set(49, 316);
// this.level = this.addChild(new Level7(this.setPauseCd));
// this.level = this.addChild(new Level8(this.setPauseCd));
globalEvent.on(GameEvent.NextLevel, this.nextLevel, this);
this.nextLevel();
......
......@@ -59,7 +59,7 @@
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 120px;
top: 100px;
width: 160px;
height: 61px;
object-fit: contain;
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level1 extends LevelBase {
......@@ -49,14 +50,13 @@ export class Level1 extends LevelBase {
const isRight = item === this.C;
this.setTouchEnable(false);
const dp = -10;
const wait = 2000;
if (isRight) {
this.setPauseCd(true);
this.right.visible = true;
this.right.position.set(item.x + dp, item.y + dp);
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -65,7 +65,7 @@ export class Level1 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -76,6 +76,7 @@ export class Level1 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level10 extends LevelBase {
......@@ -76,7 +77,7 @@ export class Level10 extends LevelBase {
.call(() => {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,12 +2,14 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level11 extends LevelBase {
level: number = 11;
A: Sprite;
B: Sprite;
right: Sprite;
error: Sprite;
......@@ -21,14 +23,14 @@ export class Level11 extends LevelBase {
onLoad() {
super.onLoad();
this.addChild(new Sprite(Assets.get(`level${this.level}/长颈鹿.png`)))
.position.set(91, 765);
this.A = this.addChild(new Sprite(Assets.get(`level${this.level}/冰箱.png`)));
this.A.anchor.set(0.5);
this.A.position.set(541, 956);
this.A.scale.set(0.5746031746031746);
this.B = this.addChild(new Sprite(Assets.get(`level${this.level}/长颈鹿.png`)));
this.B.position.set(91, 765);
this.right = this.addChild(new Sprite(Assets.get(`common/right.png`)));
this.right.position.set(642, 1141);
this.right.alpha = 0;
......@@ -39,8 +41,37 @@ export class Level11 extends LevelBase {
this.A.on("globalpointermove", this.onPointerMove, this);
this.A.on("pointerup", this.onPointerUp, this);
this.A.on("pointerupoutside", this.onPointerUp, this);
this.B.on("pointerdown", this.onBPointerDown, this);
this.B.on("pointerup", this.onBPointerUp, this);
this.B.on("globalpointermove", this.onBPointerMove, this);
}
pos = null;
onBPointerUp(e) {
this.pos = null;
}
onBPointerDown(e) {
const { x, y } = e.data.global;
this.pos = {
x: x - this.B.x,
y: y - this.B.y
}
}
onBPointerMove(e) {
if (!this.pos) return;
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.B.position.set(nx, ny);
}
onPointerDown(e) {
console.log("pointerdown", e.pointerId, e.data.global);
......@@ -122,7 +153,7 @@ export class Level11 extends LevelBase {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -138,5 +169,8 @@ export class Level11 extends LevelBase {
this.A.off("globalpointermove", this.onPointerMove, this);
this.A.off("pointerup", this.onPointerUp, this);
this.A.off("pointerupoutside", this.onPointerUp, this);
this.B.off("pointerdown", this.onPointerDown, this);
this.B.off("globalpointermove", this.onPointerMove, this);
this.B.off("pointerup", this.onPointerUp, this);
}
}
......@@ -3,6 +3,7 @@ import { Assets, Sprite, Graphics } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { getApp } from "../GamePage";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level12 extends LevelBase {
......@@ -208,7 +209,7 @@ export class Level12 extends LevelBase {
// 显示right图标并完成通关
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Circle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level13 extends LevelBase {
......@@ -77,7 +78,7 @@ export class Level13 extends LevelBase {
this.setTouchEnable(false);
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Assets, Rectangle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level14 extends LevelBase {
......@@ -43,6 +44,10 @@ export class Level14 extends LevelBase {
this.A.on("pointerdown", this.onAPointerDown, this);
this.A.on("pointerup", this.onAPointerUp, this);
this.A.on("globalpointermove", this.onAPointerMove, this);
this.B.on("pointerdown", this.onAPointerDown, this);
this.B.on("pointerup", this.onAPointerUp, this);
this.B.on("globalpointermove", this.onAPointerMove, this);
}
onTapOption(item: Sprite) {
......@@ -61,13 +66,14 @@ export class Level14 extends LevelBase {
this.error.visible = true;
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(2000)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
});
}
target = null;
pos = null;
onAPointerUp(e) {
......@@ -75,10 +81,11 @@ export class Level14 extends LevelBase {
}
onAPointerDown(e) {
this.target = e.target;
const { x, y } = e.data.global;
this.pos = {
x: x - this.A.x,
y: y - this.A.y
x: x - e.target.x,
y: y - e.target.y
}
}
......@@ -87,28 +94,37 @@ export class Level14 extends LevelBase {
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.A.position.set(nx, ny);
if (
nx >= 420
&& nx <= 540
&& ny >= 930
&& ny <= 1120
) {
this.target.position.set(nx, ny);
this.check();
}
check() {
const { x: ax, y: ay, width: aw, height: ah } = this.A;
const { x: bx, y: by, width: bw, height: bh } = this.B;
const aRect = new Rectangle(ax, ay, aw, ah);
const bRect = new Rectangle(bx, by, bw, bh);
if (aRect.intersects(bRect)) {
this.setPauseCd(true);
this.setTouchEnable(false);
Tween.get(this.B)
.to({ x: 306, y: 1000 }, 444, Ease.quadInOut)
Tween.get(this.A)
.to({ x: 484, y: 1040 }, 444, Ease.quadInOut)
.to({ x: 292, y: 1040 }, 444, Ease.quadInOut)
.call(() => {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
})
}
}
onDestroy() {
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Rectangle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level15 extends LevelBase {
......@@ -142,7 +143,7 @@ export class Level15 extends LevelBase {
Tween.get(this.right)
.wait(999)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level16 extends LevelBase {
......@@ -70,7 +71,7 @@ export class Level16 extends LevelBase {
.call(() => {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level18 extends LevelBase {
......@@ -90,7 +91,7 @@ export class Level18 extends LevelBase {
Tween.get(this.right)
.wait(666)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,11 +2,15 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level19 extends LevelBase {
level: number = 19;
p1: Sprite;
p2: Sprite;
A: Sprite;
right: Sprite;
......@@ -29,6 +33,11 @@ export class Level19 extends LevelBase {
this.A.position.set(430, 1100);
this.A.scale.set(0.5948827292110874);
this.p1 = this.addChild(new Sprite(Assets.get(`level${this.level}/女.png`)));
this.p1.position.set(32, 897);
this.p2 = this.addChild(new Sprite(Assets.get(`level${this.level}/男.png`)));
this.p2.position.set(176, 878);
this.right = this.addChild(new Sprite(Assets.get(`common/right.png`)));
this.right.position.set(613, 1104);
this.right.alpha = 0;
......@@ -39,6 +48,38 @@ export class Level19 extends LevelBase {
this.A.on("globalpointermove", this.onPointerMove, this);
this.A.on("pointerup", this.onPointerUp, this);
this.A.on("pointerupoutside", this.onPointerUp, this);
[this.p1, this.p2]
.forEach((item) => {
item.on("pointerdown", this.onPPointerDown, this);
item.on("globalpointermove", this.onPPointerMove, this);
item.on("pointerup", this.onPPointerUp, this);
item.on("pointerupoutside", this.onPPointerUp, this);
});
}
target = null;
pos = null;
onPPointerUp(e) {
this.pos = null;
}
onPPointerDown(e) {
this.target = e.target;
const { x, y } = e.data.global;
this.pos = {
x: x - e.target.x,
y: y - e.target.y
}
}
onPPointerMove(e) {
if (!this.pos) return;
const { x, y } = e.data.global;
const nx = x - this.pos.x;
const ny = y - this.pos.y;
this.target.position.set(nx, ny);
}
onPointerDown(e) {
......@@ -122,7 +163,7 @@ export class Level19 extends LevelBase {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level2 extends LevelBase {
......@@ -58,8 +59,8 @@ export class Level2 extends LevelBase {
this.setPauseCd(true);
this.right.visible = true;
this.right.position.set(item.x + dp, item.y + dp);
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -68,7 +69,7 @@ export class Level2 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -79,6 +80,7 @@ export class Level2 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Rectangle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level20 extends LevelBase {
......@@ -110,7 +111,7 @@ export class Level20 extends LevelBase {
this.setPauseCd(true);
Tween.get(this.right)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Rectangle, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level21 extends LevelBase {
......@@ -77,7 +78,7 @@ export class Level21 extends LevelBase {
Tween.get(this.B).to({ alpha: 0 }, 666, Ease.quadInOut);
Tween.get(this.right)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level22 extends LevelBase {
......@@ -82,7 +83,7 @@ export class Level22 extends LevelBase {
this.setTouchEnable(false);
Tween.get(this.right)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level23 extends LevelBase {
......@@ -51,8 +52,8 @@ export class Level23 extends LevelBase {
this.setPauseCd(true);
this.right.visible = true;
this.right.position.set(item.x + dp, item.y + dp);
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -61,7 +62,7 @@ export class Level23 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -72,6 +73,7 @@ export class Level23 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level24 extends LevelBase {
......@@ -214,7 +215,7 @@ export class Level24 extends LevelBase {
// 显示right图标并完成通关
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level25 extends LevelBase {
......@@ -83,7 +84,7 @@ export class Level25 extends LevelBase {
this.setPauseCd(true);
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level3 extends LevelBase {
......@@ -55,8 +56,8 @@ export class Level3 extends LevelBase {
this.setPauseCd(true);
this.right.visible = true;
this.right.position.set(item.x + dp, item.y + dp);
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -65,7 +66,7 @@ export class Level3 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -76,6 +77,7 @@ export class Level3 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level4 extends LevelBase {
......@@ -55,8 +56,8 @@ export class Level4 extends LevelBase {
if (isRight) {
this.setPauseCd(true);
this.right.visible = true;
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -65,7 +66,7 @@ export class Level4 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -76,6 +77,7 @@ export class Level4 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level5 extends LevelBase {
......@@ -65,7 +66,7 @@ export class Level5 extends LevelBase {
this.error.visible = true;
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(2000)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -106,7 +107,7 @@ export class Level5 extends LevelBase {
.call(() => {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level6 extends LevelBase {
......@@ -82,7 +83,7 @@ export class Level6 extends LevelBase {
Tween.get(this.right)
.wait(666)
.to({ alpha: 1 }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -3,6 +3,7 @@ import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { getApp } from "@/pages/GamePage/GamePage.tsx";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level7 extends LevelBase {
......@@ -43,7 +44,7 @@ export class Level7 extends LevelBase {
.call(() => {
Tween.get(this.coin)
.to({ y: -300, }, 666, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { errorWaitTime, rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level8 extends LevelBase {
......@@ -55,8 +56,8 @@ export class Level8 extends LevelBase {
if (isRight) {
this.setPauseCd(true);
this.right.visible = true;
Tween.get(this.error)
.wait(wait)
Tween.get(this.right)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......@@ -65,7 +66,7 @@ export class Level8 extends LevelBase {
this.error.position.set(item.x + dp, item.y + dp);
Tween.removeTweens(this.error);
Tween.get(this.error)
.wait(wait)
.wait(errorWaitTime)
.call(() => {
this.error.visible = false;
this.setTouchEnable(true);
......@@ -76,6 +77,7 @@ export class Level8 extends LevelBase {
onDestroy() {
super.onDestroy();
Tween.removeTweens(this.right);
Tween.removeTweens(this.error);
}
......
......@@ -2,6 +2,7 @@ import { LevelBase } from "@/pages/GamePage/Components/LevelBase.ts";
import { Assets, Sprite } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { rightWaitTime } from "@/pages/GamePage/Level/LevelConfig.ts";
export class Level9 extends LevelBase {
......@@ -66,7 +67,7 @@ export class Level9 extends LevelBase {
.call(() => {
Tween.get(this.right)
.to({ alpha: 1 }, 444, Ease.quadInOut)
.wait(2000)
.wait(rightWaitTime)
.call(() => {
globalEvent.emit(GameEvent.NextLevel);
});
......
......@@ -25,6 +25,9 @@ import { Level24 } from "@/pages/GamePage/Level/Level24.ts";
import { Level25 } from "./Level25";
export const errorWaitTime = 1000;
export const rightWaitTime = 2000;
export const LevelArr = [
{ cls: Level1, tip: `5=1` },
{ cls: Level2, tip: `图中一共有9个金币` },
......
......@@ -152,7 +152,8 @@
left: 145px;
top: 67px;
position: absolute;
font-size: 30px;
// font-size: 30px;
font-size: 28px;
line-height: 33px;
color: rgba(30, 76, 169, 1);
.lineClamp1();
......
......@@ -32,9 +32,9 @@ class Homepage extends React.Component {
}
async componentDidMount() {
if (isWeiXin()) {
if (!await store.checkBindStatus()) return;
}
// if (isWeiXin()) {
// if (!await store.checkBindStatus()) return;
// }
await shareStore.doAssist();
await store.updateIndex();
this.initSensor();
......
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