Commit ee1e8dd4 authored by haiyoucuv's avatar haiyoucuv

11

parent dfb920ad
...@@ -13,6 +13,8 @@ export class Level21 extends LevelBase { ...@@ -13,6 +13,8 @@ export class Level21 extends LevelBase {
right: Sprite; right: Sprite;
gameOver = false;
onLoad() { onLoad() {
super.onLoad(); super.onLoad();
...@@ -64,6 +66,8 @@ export class Level21 extends LevelBase { ...@@ -64,6 +66,8 @@ export class Level21 extends LevelBase {
check() { check() {
if (this.gameOver) return;
const { x: ax, y: ay, width: aw, height: ah } = this.A; const { x: ax, y: ay, width: aw, height: ah } = this.A;
const { x: bx, y: by, width: bw, height: bh } = this.B; const { x: bx, y: by, width: bw, height: bh } = this.B;
...@@ -72,6 +76,7 @@ export class Level21 extends LevelBase { ...@@ -72,6 +76,7 @@ export class Level21 extends LevelBase {
.intersects(new Rectangle(bx + edge, by + edge, bw - edge * 2, bh - edge * 2)); .intersects(new Rectangle(bx + edge, by + edge, bw - edge * 2, bh - edge * 2));
if (isIns) { if (isIns) {
this.gameOver = true;
this.setPauseCd(true); this.setPauseCd(true);
this.setTouchEnable(false); this.setTouchEnable(false);
this.right.position.set(bx - 30, by - 30); this.right.position.set(bx - 30, by - 30);
......
...@@ -29,29 +29,29 @@ export const errorWaitTime = 1000; ...@@ -29,29 +29,29 @@ export const errorWaitTime = 1000;
export const rightWaitTime = 2000; export const rightWaitTime = 2000;
export const LevelArr = [ export const LevelArr = [
{ cls: Level1, tip: `5=1` }, // { cls: Level1, tip: `5=1` },
{ cls: Level2, tip: `图中一共有9个金币` }, // { cls: Level2, tip: `图中一共有9个金币` },
{ cls: Level3, tip: `当然是太阳最高啦` }, // { cls: Level3, tip: `当然是太阳最高啦` },
{ cls: Level4, tip: `没有什么比猫猫的<br/>左右爪更像了` }, // { cls: Level4, tip: `没有什么比猫猫的<br/>左右爪更像了` },
{ cls: Level5, tip: `将蛋黄放在蛋白上<br/>拼出荷包蛋` }, // { cls: Level5, tip: `将蛋黄放在蛋白上<br/>拼出荷包蛋` },
{ cls: Level6, tip: `直接移动最底层的蛋糕` }, // { cls: Level6, tip: `直接移动最底层的蛋糕` },
{ cls: Level7, tip: `旋转存钱罐,倒出金币` }, // { cls: Level7, tip: `旋转存钱罐,倒出金币` },
{ cls: Level8, tip: `最深的颜色是题目` }, // { cls: Level8, tip: `最深的颜色是题目` },
{ cls: Level9, tip: `移动小鸭子至河边` }, // { cls: Level9, tip: `移动小鸭子至河边` },
{ cls: Level10, tip: `将“1”移动至等号右边<br/>形成等式` }, // { cls: Level10, tip: `将“1”移动至等号右边<br/>形成等式` },
{ cls: Level11, tip: `将冰箱放大至能装够装下<br/>长颈鹿` }, // { cls: Level11, tip: `将冰箱放大至能装够装下<br/>长颈鹿` },
{ cls: Level12, tip: `掐断烟头` }, // { cls: Level12, tip: `掐断烟头` },
{ cls: Level13, tip: `打开盖子看看` }, // { cls: Level13, tip: `打开盖子看看` },
{ cls: Level14, tip: `将香蕉移动到牛奶中<br/>变成香蕉牛奶` }, // { cls: Level14, tip: `将香蕉移动到牛奶中<br/>变成香蕉牛奶` },
{ cls: Level15, tip: `猫吃老鼠` }, // { cls: Level15, tip: `猫吃老鼠` },
{ cls: Level16, tip: `移动笼子罩住小鸭子` }, // { cls: Level16, tip: `移动笼子罩住小鸭子` },
{ cls: Level17, tip: `别忘了,人是高等动物哦` }, // { cls: Level17, tip: `别忘了,人是高等动物哦` },
{ cls: Level18, tip: `移开乌云露出太阳<br/>让冰块融化` }, // { cls: Level18, tip: `移开乌云露出太阳<br/>让冰块融化` },
{ cls: Level19, tip: `将小船放大,装下两人` }, // { cls: Level19, tip: `将小船放大,装下两人` },
{ cls: Level20, tip: `别忘了把题目也装进箱子里` }, // { cls: Level20, tip: `别忘了把题目也装进箱子里` },
{ cls: Level21, tip: `移动鸡蛋,碰一碰便知` }, { cls: Level21, tip: `移动鸡蛋,碰一碰便知` },
{ cls: Level22, tip: `移开圣诞老人的衣服看看` }, // { cls: Level22, tip: `移开圣诞老人的衣服看看` },
{ cls: Level23, tip: `一样重` }, // { cls: Level23, tip: `一样重` },
{ cls: Level24, tip: `将雪球合在一起滚成大雪球` }, // { cls: Level24, tip: `将雪球合在一起滚成大雪球` },
{ cls: Level25, tip: `按住小猪鼻子,把它憋醒` }, // { cls: Level25, tip: `按住小猪鼻子,把它憋醒` },
]; ];
...@@ -13,6 +13,7 @@ import taskStore from '../../store/task.ts'; ...@@ -13,6 +13,7 @@ import taskStore from '../../store/task.ts';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors'; import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui'; import { Button } from '@grace/ui';
import store from "@/store/store.js";
@observer @observer
class Taskpop extends React.Component { class Taskpop extends React.Component {
......
...@@ -57,7 +57,7 @@ class GameStore { ...@@ -57,7 +57,7 @@ class GameStore {
score, score,
timestamp: Date.now(), timestamp: Date.now(),
}; };
console.log(d); console.log(1, d);
const param = AESEncrypt(JSON.stringify(d), "7A2F4B8D1E6C3905", "cDOiBC1n2QrkAY2P"); const param = AESEncrypt(JSON.stringify(d), "7A2F4B8D1E6C3905", "cDOiBC1n2QrkAY2P");
const { success, data } = await API.middleSubmit({ param }); const { success, data } = await API.middleSubmit({ param });
...@@ -76,7 +76,7 @@ class GameStore { ...@@ -76,7 +76,7 @@ class GameStore {
score, score,
timestamp: Date.now(), timestamp: Date.now(),
}; };
console.log(d); console.log(2, d);
const param = AESEncrypt(JSON.stringify(d), "7A2F4B8D1E6C3905", "cDOiBC1n2QrkAY2P"); const param = AESEncrypt(JSON.stringify(d), "7A2F4B8D1E6C3905", "cDOiBC1n2QrkAY2P");
const { success, data } = await API.submit({ param }); const { success, data } = await API.submit({ param });
......
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