Commit 4a04233e authored by cc's avatar cc
parents ec39b8b4 27eb93e0
......@@ -31,7 +31,7 @@ class App extends Component {
const defaultPage = {
myPrize: MyPrize, // TODO 举例子 新宿台奖品页
index: LoadingDemo,
}[skinId] || HomePage;
}[skinId] || GamePage;
PageCtrl.changePage(defaultPage);
}
......
src/assets/common/close.png

1.54 KB | W: | H:

src/assets/common/close.png

4.78 KB | W: | H:

src/assets/common/close.png
src/assets/common/close.png
src/assets/common/close.png
src/assets/common/close.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -26,13 +26,13 @@ export class Game extends Base {
const qsBg = this.addChild(new Sprite(Assets.get("问题.png")));
qsBg.position.set(49, 316);
this.level = this.addChild(new Level9());
// this.level = this.addChild(new Level9());
gameStore.start();
globalEvent.on(GameEvent.NextLevel, this.nextLevel, this);
// this.nextLevel();
this.nextLevel();
}
......@@ -53,7 +53,7 @@ export class Game extends Base {
this.level.destroy();
}
const cls = LevelArr[levelIdx];
const { cls } = LevelArr[levelIdx];
this.level = this.addChild(new cls());
}
......
......@@ -17,6 +17,9 @@ import gameStore from "@/store/gameStore.ts";
import.meta.env.DEV && initDevtools({});
import bgImg from "../../assets/GamePage/bg.jpg";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
import TipPanel from "@/panels/TipPanel/TipPanel.tsx";
import { LevelArr } from "@/pages/GamePage/Level/LevelConfig.ts";
export function getApp(): Application {
return window["__app"];
......@@ -101,6 +104,10 @@ class GamePage extends React.Component<any, any> {
}
clickTip = () => {
const { levelIndex, levelIdxArr } = gameStore.gameInfo;
const levelIdx = levelIdxArr[levelIndex];
const { tip, cls } = LevelArr[levelIdx];
ModalCtrl.showModal(TipPanel, { tip });
}
render() {
......
......@@ -11,14 +11,29 @@ import { Level23 } from "@/pages/GamePage/Level/Level23.ts";
export const LevelArr = [
Level1,
Level2,
Level3,
Level4,
Level5,
Level7,
Level8,
Level9,
Level14,
Level23,
{ cls: Level1, tip: `5=1` },
{ cls: Level2, tip: `图中一共有9个金币` },
{ cls: Level3, tip: `当然是太阳最高啦` },
{ cls: Level4, tip: `没有什么比猫猫的<br/>左右爪更像了` },
{ cls: Level5, tip: `将蛋黄放在蛋白上<br/>拼出荷包蛋` },
{ cls: Level5, tip: `直接移动最底层的蛋糕` }, // 6
{ cls: Level7, tip: `旋转存钱罐,倒出金币` },
{ cls: Level8, tip: `最深的颜色是题目` },
{ cls: Level9, tip: `移动小鸭子至河边` },
{ cls: Level9, tip: `将“1”移动至等号右边<br/>形成等式` }, // 10
{ cls: Level9, tip: `将冰箱放大至能装够装下<br/>长颈鹿` }, // 11
{ cls: Level9, tip: `掐断烟头` }, // 12
{ cls: Level9, tip: `打开盖子看看` }, // 13
{ cls: Level14, tip: `将香蕉移动到牛奶中<br/>变成香蕉牛奶` },
{ cls: Level14, tip: `猫吃老鼠` }, // 15
{ cls: Level14, tip: `移动笼子罩住小鸭子` }, // 16
{ cls: Level14, tip: `别忘了,人是高等动物哦` }, // 17
{ cls: Level14, tip: `移开乌云露出太阳<br/>让冰块融化` }, // 18
{ cls: Level14, tip: `将冰箱放大至能够装下长颈鹿` }, // 19
{ cls: Level14, tip: `别忘了把题目也装进箱子里` }, // 20
{ cls: Level14, tip: `移动鸡蛋,碰一碰便知` }, // 21
{ cls: Level14, tip: `移开圣诞老人的衣服看看` }, // 22
{ cls: Level23, tip: `当然是一样重` },
{ cls: Level23, tip: `将雪球合在一起滚成大雪球` }, // 24
{ cls: Level23, tip: `按住小猪鼻子,把它憋醒` }, // 25
];
@import "../../res.less";
.SignSucPanel {
.TipPanel {
width: 750px;
height: 1624px;
position: absolute;
left: 0;
top: 0;
.bgEffect {
width: 750px;
height: 1624px;
position: absolute;
left: 0;
top: 0;
}
.bg {
position: absolute;
left: 0;
top: 397px;
width: 750px;
height: 741px;
.webpBg("SignSucPanel/bg.png");
left: 105px;
top: 491px;
width: 593px;
height: 475px;
.webpBg("TipPanel/bg.png");
}
.title {
.text {
position: absolute;
left: 138px;
top: 306px;
width: 384px;
height: 84px;
.webpBg("SignSucPanel/签到成功.png");
}
.normal {
.tip {
font-family: "zzgfyht";
font-size: 53.62px;
color: #8f2245;
position: absolute;
left: 0;
top: 485px;
width: 100%;
text-align: center;
}
top: 550px;
width: 464px;
height: 215px;
.img {
position: absolute;
left: 245px;
top: 583px;
width: 263px;
height: 253px;
.webpBg("SignSucPanel/金币堆.png");
}
}
.vip {
color: #8f2245;
font-size: 36px;
color: rgb(153, 57, 27);
font-weight: bold;
text-align: center;
font-family: "zzgfyht";
.tip {
font-size: 54.52px;
position: absolute;
left: 0;
top: 481px;
width: 100%;
text-align: center;
}
.left {
position: absolute;
left: 105px;
top: 581px;
width: 300px;
font-size: 43.19px;
}
.right {
position: absolute;
left: 340px;
top: 581px;
width: 300px;
font-size: 43.19px;
}
.img {
position: absolute;
left: 168px;
top: 643px;
width: 402px;
height: 184px;
.webpBg("SignSucPanel/会员金币堆.png");
}
display: flex;
align-items: center;
justify-content: center;
}
.btn {
position: absolute;
left: 164px;
top: 925px;
width: 420px;
height: 123px;
.webpBg("SignSucPanel/按钮.png");
left: 244px;
top: 766px;
width: 263px;
height: 92px;
.webpBg("TipPanel/btn.png");
}
.close {
position: absolute;
left: 336px;
top: 1194px;
width: 79px;
height: 79px;
left: 343px;
top: 1058px;
width: 64px;
height: 64px;
.webpBg("common/close.png");
}
......
......@@ -2,7 +2,6 @@ import React from "react";
import {observer} from "mobx-react";
import "./TipPanel.less";
import {Button} from "@grace/ui";
import {_asyncThrottle} from "@/utils/utils.ts";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
export interface ITipPanelProps {
......@@ -19,16 +18,18 @@ class TipPanel extends React.Component<ITipPanelProps> {
ModalCtrl.closeModal();
};
clickBtn = _asyncThrottle(async () => {
clickBtn = () => {
ModalCtrl.closeModal();
});
};
render() {
const { tip } = this.props;
return <div className="SignSucPanel modal_center">
return <div className="TipPanel modal_center">
<div className="bg"/>
<div></div>
<div className="text" dangerouslySetInnerHTML={{
__html: tip,
}}/>
<Button className="btn" onClick={this.clickBtn}/>
<Button className="close" onClick={this.clickClose}/>
</div>;
......
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