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
26364962
Commit
26364962
authored
May 23, 2025
by
韦燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:merge
parent
b8eca377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
1 deletion
+95
-1
Game.ts
src/pages/GamePage/Game.ts
+2
-1
Level16.ts
src/pages/GamePage/Level/Level16.ts
+93
-0
No files found.
src/pages/GamePage/Game.ts
View file @
26364962
...
@@ -26,6 +26,7 @@ import { Level23 } from "@/pages/GamePage/Level/Level23.ts";
...
@@ -26,6 +26,7 @@ import { Level23 } from "@/pages/GamePage/Level/Level23.ts";
import
gameStore
from
"@/store/gameStore.ts"
;
import
gameStore
from
"@/store/gameStore.ts"
;
import
{
LevelArr
}
from
"@/pages/GamePage/Level/LevelConfig.ts"
;
import
{
LevelArr
}
from
"@/pages/GamePage/Level/LevelConfig.ts"
;
import
{
LevelBase
}
from
"@/pages/GamePage/Components/LevelBase.ts"
;
import
{
LevelBase
}
from
"@/pages/GamePage/Components/LevelBase.ts"
;
import
{
Level16
}
from
"./Level/Level16.ts"
;
@
observer
@
observer
export
class
Game
extends
Base
{
export
class
Game
extends
Base
{
...
@@ -36,7 +37,7 @@ export class Game extends Base {
...
@@ -36,7 +37,7 @@ 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
Level1
9
());
this
.
level
=
this
.
addChild
(
new
Level1
6
());
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
// this.nextLevel();
// this.nextLevel();
...
...
src/pages/GamePage/Level/Level16.ts
0 → 100644
View file @
26364962
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
Level16
extends
LevelBase
{
level
:
number
=
16
;
A
:
Sprite
;
B
:
Sprite
;
D
:
Sprite
;
right
:
Sprite
;
error
:
Sprite
;
onLoad
()
{
super
.
onLoad
();
// this.addChild(new Sprite(Assets.get(`level${this.level}/C.png`)))
// .position.set(207, 902);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/B.png`
)));
this
.
B
.
position
.
set
(
293
,
1035
);
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
A
.
position
.
set
(
105
,
667
);
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/right.png`
)));
this
.
right
.
position
.
set
(
560
,
1185
);
this
.
right
.
alpha
=
0
;
this
.
right
.
interactive
=
false
;
this
.
right
.
eventMode
=
"none"
;
this
.
A
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
A
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
this
.
A
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
}
pos
=
null
;
onAPointerUp
(
e
)
{
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
);
console
.
error
(
"123"
,
nx
,
ny
)
if
(
nx
>=
0
&&
nx
<=
228
&&
ny
>=
920
&&
ny
<=
1034
)
{
this
.
setTouchEnable
(
false
);
// Tween.get(this.B).to({ alpha: 0 }, 444, Ease.quadInOut);
Tween
.
get
(
this
.
A
)
.
to
({
x
:
101
,
y
:
946
},
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
.
B
);
Tween
.
removeTweens
(
this
.
right
);
this
.
A
.
off
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
}
}
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