Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB_StrongestBrain_250520
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
RB_StrongestBrain_250520
Commits
4a264ab6
Commit
4a264ab6
authored
May 22, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21
parent
fee7592e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
137 additions
and
5 deletions
+137
-5
App.tsx
src/App.tsx
+1
-1
A.png
src/assets/Game/level20/A.png
+0
-0
B.png
src/assets/Game/level20/B.png
+0
-0
C.png
src/assets/Game/level20/C.png
+0
-0
box.png
src/assets/Game/level20/box.png
+0
-0
qs.png
src/assets/Game/level20/qs.png
+0
-0
right.png
src/assets/Game/level20/right.png
+0
-0
top.png
src/assets/Game/level20/top.png
+0
-0
Game.ts
src/pages/GamePage/Game.ts
+3
-2
Level20.ts
src/pages/GamePage/Level/Level20.ts
+130
-0
LevelConfig.ts
src/pages/GamePage/Level/LevelConfig.ts
+3
-2
No files found.
src/App.tsx
View file @
4a264ab6
...
@@ -35,7 +35,7 @@ class App extends Component {
...
@@ -35,7 +35,7 @@ class App extends Component {
myPrize
:
MyPrize
,
// TODO 举例子 新宿台奖品页
myPrize
:
MyPrize
,
// TODO 举例子 新宿台奖品页
index
:
LoadingDemo
,
index
:
LoadingDemo
,
sharepage
:
SharePage
,
sharepage
:
SharePage
,
}[
skinId
]
||
Ho
mePage
;
}[
skinId
]
||
Ga
mePage
;
PageCtrl
.
changePage
(
defaultPage
);
PageCtrl
.
changePage
(
defaultPage
);
}
}
...
...
src/assets/Game/level20/A.png
0 → 100644
View file @
4a264ab6
50 KB
src/assets/Game/level20/B.png
0 → 100644
View file @
4a264ab6
54.3 KB
src/assets/Game/level20/C.png
0 → 100644
View file @
4a264ab6
33.4 KB
src/assets/Game/level20/box.png
0 → 100644
View file @
4a264ab6
49.2 KB
src/assets/Game/level20/qs.png
0 → 100644
View file @
4a264ab6
4.66 KB
src/assets/Game/level20/right.png
0 → 100644
View file @
4a264ab6
2.26 KB
src/assets/Game/level20/top.png
0 → 100644
View file @
4a264ab6
46.4 KB
src/pages/GamePage/Game.ts
View file @
4a264ab6
...
@@ -16,6 +16,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
...
@@ -16,6 +16,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level20
}
from
"@/pages/GamePage/Level/Level20.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
...
@@ -32,10 +33,10 @@ export class Game extends Base {
...
@@ -32,10 +33,10 @@ export class Game extends Base {
const
qsBg
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
"问题.png"
)));
const
qsBg
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
"问题.png"
)));
qsBg
.
position
.
set
(
49
,
316
);
qsBg
.
position
.
set
(
49
,
316
);
// this.level = this.addChild(new Level21
());
this
.
level
=
this
.
addChild
(
new
Level20
());
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
this
.
nextLevel
();
//
this.nextLevel();
}
}
...
...
src/pages/GamePage/Level/Level20.ts
0 → 100644
View file @
4a264ab6
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"
;
export
class
Level20
extends
LevelBase
{
level
:
number
=
20
;
A
:
Sprite
;
B
:
Sprite
;
C
:
Sprite
;
right
:
Sprite
;
onLoad
()
{
super
.
onLoad
();
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/box.png`
)))
.
position
.
set
(
95
,
959
);
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
A
.
position
.
set
(
84
,
743
);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/B.png`
)));
this
.
B
.
position
.
set
(
351
,
664
);
this
.
C
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/C.png`
)));
this
.
C
.
position
.
set
(
536
,
839
);
this
.
addChild
(
this
.
qs
);
const
top
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/top.png`
)))
top
.
position
.
set
(
95
,
970
);
top
.
interactive
=
false
;
top
.
eventMode
=
"none"
;
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/right.png`
)));
this
.
right
.
position
.
set
(
503
,
1146
);
this
.
right
.
alpha
=
0
;
this
.
right
.
interactive
=
false
;
this
.
right
.
eventMode
=
"none"
;
[
this
.
A
,
this
.
B
,
this
.
C
,
this
.
qs
].
forEach
((
item
)
=>
{
item
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
item
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
item
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
});
}
target
:
Sprite
=
null
;
pos
:
{
x
:
number
,
y
:
number
}
=
null
;
onAPointerUp
(
e
)
{
this
.
pos
=
null
;
this
.
target
=
null
;
}
onAPointerDown
(
e
)
{
this
.
target
=
e
.
target
;
const
{
x
,
y
}
=
e
.
data
.
global
;
this
.
pos
=
{
x
:
x
-
e
.
target
.
x
,
y
:
y
-
e
.
target
.
y
}
}
onAPointerMove
(
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
);
this
.
check
();
}
check
()
{
const
{
x
:
ax
,
y
:
ay
,
width
:
aw
,
height
:
ah
}
=
this
.
target
;
const
isIns
=
new
Rectangle
(
ax
,
ay
,
aw
,
ah
)
.
intersects
(
new
Rectangle
(
280
,
1000
,
260
,
180
));
if
(
isIns
)
{
this
.
target
.
eventMode
=
"none"
;
this
.
target
.
interactive
=
false
;
const
pos
=
new
Map
([
[
this
.
A
,
{
x
:
184
,
y
:
864
}],
[
this
.
B
,
{
x
:
285
,
y
:
854
}],
[
this
.
C
,
{
x
:
370
,
y
:
905
}],
[
this
.
qs
,
{
x
:
255
,
y
:
950
,
angle
:
45
}],
]).
get
(
this
.
target
);
Tween
.
get
(
this
.
target
)
.
to
({
x
:
pos
.
x
,
y
:
pos
.
y
,
angle
:
pos
.
angle
||
0
},
666
,
Ease
.
quadInOut
);
this
.
target
=
null
;
this
.
pos
=
null
;
if
(
!
this
.
A
.
interactive
&&
!
this
.
B
.
interactive
&&
!
this
.
C
.
interactive
&&
!
this
.
qs
.
interactive
)
{
Tween
.
get
(
this
.
right
)
.
to
({
alpha
:
1
},
666
,
Ease
.
quadInOut
)
.
wait
(
2000
)
.
call
(()
=>
{
globalEvent
.
emit
(
GameEvent
.
NextLevel
);
});
}
}
}
onDestroy
()
{
super
.
onDestroy
();
Tween
.
removeTweens
(
this
.
right
);
[
this
.
A
,
this
.
B
].
forEach
((
item
)
=>
{
item
.
off
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
});
}
}
src/pages/GamePage/Level/LevelConfig.ts
View file @
4a264ab6
...
@@ -11,6 +11,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
...
@@ -11,6 +11,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level20
}
from
"@/pages/GamePage/Level/Level20.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
...
@@ -36,8 +37,8 @@ export const LevelArr = [
...
@@ -36,8 +37,8 @@ export const LevelArr = [
{
cls
:
Level14
,
tip
:
`别忘了,人是高等动物哦`
},
// 17
{
cls
:
Level14
,
tip
:
`别忘了,人是高等动物哦`
},
// 17
{
cls
:
Level18
,
tip
:
`移开乌云露出太阳<br/>让冰块融化`
},
{
cls
:
Level18
,
tip
:
`移开乌云露出太阳<br/>让冰块融化`
},
{
cls
:
Level14
,
tip
:
`将冰箱放大至能够装下长颈鹿`
},
// 19
{
cls
:
Level14
,
tip
:
`将冰箱放大至能够装下长颈鹿`
},
// 19
{
cls
:
Level
14
,
tip
:
`别忘了把题目也装进箱子里`
},
// 20
{
cls
:
Level
20
,
tip
:
`别忘了把题目也装进箱子里`
},
{
cls
:
Level21
,
tip
:
`移动鸡蛋,碰一碰便知`
},
// 21
{
cls
:
Level21
,
tip
:
`移动鸡蛋,碰一碰便知`
},
{
cls
:
Level22
,
tip
:
`移开圣诞老人的衣服看看`
},
{
cls
:
Level22
,
tip
:
`移开圣诞老人的衣服看看`
},
{
cls
:
Level23
,
tip
:
`一样重`
},
{
cls
:
Level23
,
tip
:
`一样重`
},
{
cls
:
Level23
,
tip
:
`将雪球合在一起滚成大雪球`
},
// 24
{
cls
:
Level23
,
tip
:
`将雪球合在一起滚成大雪球`
},
// 24
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment