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
f0c67089
Commit
f0c67089
authored
May 21, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5
parent
7dc7dcd1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
1 deletion
+85
-1
duck.png
src/assets/Game/level9/duck.png
+0
-0
img.png
src/assets/Game/level9/img.png
+0
-0
qs.png
src/assets/Game/level9/qs.png
+0
-0
right.png
src/assets/Game/level9/right.png
+0
-0
title9.png
src/assets/GamePage/title/title9.png
+0
-0
Game.ts
src/pages/GamePage/Game.ts
+2
-1
Level9.ts
src/pages/GamePage/Level/Level9.ts
+79
-0
LevelConfig.ts
src/pages/GamePage/Level/LevelConfig.ts
+4
-0
No files found.
src/assets/Game/level9/duck.png
0 → 100644
View file @
f0c67089
14 KB
src/assets/Game/level9/img.png
0 → 100644
View file @
f0c67089
76.3 KB
src/assets/Game/level9/qs.png
0 → 100644
View file @
f0c67089
3.27 KB
src/assets/Game/level9/right.png
0 → 100644
View file @
f0c67089
2.26 KB
src/assets/GamePage/title/title9.png
0 → 100644
View file @
f0c67089
4.47 KB
src/pages/GamePage/Game.ts
View file @
f0c67089
...
...
@@ -10,6 +10,7 @@ import { Level4 } from "@/pages/GamePage/Level/Level4.ts";
import
{
Level5
}
from
"@/pages/GamePage/Level/Level5.ts"
;
import
{
Level7
}
from
"@/pages/GamePage/Level/Level7.ts"
;
import
{
Level8
}
from
"@/pages/GamePage/Level/Level8.ts"
;
import
{
Level9
}
from
"@/pages/GamePage/Level/Level9.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
import
gameStore
from
"@/store/gameStore.ts"
;
...
...
@@ -25,7 +26,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
Level
14
());
this
.
level
=
this
.
addChild
(
new
Level
9
());
gameStore
.
start
();
...
...
src/pages/GamePage/Level/Level9.ts
0 → 100644
View file @
f0c67089
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"
;
export
class
Level9
extends
LevelBase
{
level
:
number
=
9
;
A
:
Sprite
;
right
:
Sprite
;
error
:
Sprite
;
onLoad
()
{
super
.
onLoad
();
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/img.png`
)))
.
position
.
set
(
46
,
979
);
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/duck.png`
)));
this
.
A
.
position
.
set
(
330
,
764
);
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/right.png`
)));
this
.
right
.
position
.
set
(
470
,
1050
);
this
.
right
.
alpha
=
0
;
this
.
right
.
interactive
=
false
;
this
.
right
.
eventMode
=
"none"
;
this
.
A
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
A
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
}
pos
=
null
;
onAPointerDown
(
e
)
{
const
{
x
,
y
}
=
e
.
data
.
global
;
this
.
pos
=
{
x
:
x
-
this
.
A
.
x
,
y
:
y
-
this
.
A
.
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
.
A
.
position
.
set
(
nx
,
ny
);
if
(
nx
>=
110
&&
nx
<=
530
&&
ny
>=
980
&&
ny
<=
1100
)
{
this
.
setTouchEnable
(
false
);
Tween
.
get
(
this
.
A
)
.
to
({
x
:
380
,
y
:
975
},
444
,
Ease
.
quadInOut
)
.
call
(()
=>
{
Tween
.
get
(
this
.
right
)
.
to
({
alpha
:
1
},
444
,
Ease
.
quadInOut
)
.
wait
(
2000
)
.
call
(()
=>
{
globalEvent
.
emit
(
GameEvent
.
NextLevel
);
});
})
}
}
onDestroy
()
{
super
.
onDestroy
();
Tween
.
removeTweens
(
this
.
A
);
Tween
.
removeTweens
(
this
.
right
);
this
.
A
.
off
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
}
}
src/pages/GamePage/Level/LevelConfig.ts
View file @
f0c67089
...
...
@@ -5,6 +5,8 @@ import { Level4 } from "@/pages/GamePage/Level/Level4.ts";
import
{
Level5
}
from
"@/pages/GamePage/Level/Level5.ts"
;
import
{
Level7
}
from
"@/pages/GamePage/Level/Level7.ts"
;
import
{
Level8
}
from
"@/pages/GamePage/Level/Level8.ts"
;
import
{
Level9
}
from
"@/pages/GamePage/Level/Level9.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
...
...
@@ -16,5 +18,7 @@ export const LevelArr = [
Level5
,
Level7
,
Level8
,
Level9
,
Level14
,
Level23
,
];
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