Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB-studyChina-20250617
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-studyChina-20250617
Commits
ec595bee
Commit
ec595bee
authored
May 22, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20
parent
7d8dd9a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
Game.ts
src/pages/GamePage/Game.ts
+1
-1
Level13.ts
src/pages/GamePage/Level/Level13.ts
+20
-12
No files found.
src/pages/GamePage/Game.ts
View file @
ec595bee
...
@@ -34,7 +34,7 @@ export class Game extends Base {
...
@@ -34,7 +34,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
5
());
this
.
level
=
this
.
addChild
(
new
Level1
3
());
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
// this.nextLevel();
// this.nextLevel();
...
...
src/pages/GamePage/Level/Level13.ts
View file @
ec595bee
...
@@ -20,12 +20,12 @@ export class Level13 extends LevelBase {
...
@@ -20,12 +20,12 @@ export class Level13 extends LevelBase {
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/D.png`
)))
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/D.png`
)))
.
position
.
set
(
198
,
687
);
.
position
.
set
(
198
,
687
);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/B.png`
)));
this
.
B
.
position
.
set
(
463
,
1086
);
this
.
C
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/C.png`
)));
this
.
C
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/C.png`
)));
this
.
C
.
position
.
set
(
198
,
687
);
this
.
C
.
position
.
set
(
198
,
687
);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/B.png`
)));
this
.
B
.
position
.
set
(
463
,
1086
);
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
A
.
position
.
set
(
161
,
1086
);
this
.
A
.
position
.
set
(
161
,
1086
);
...
@@ -35,22 +35,28 @@ export class Level13 extends LevelBase {
...
@@ -35,22 +35,28 @@ export class Level13 extends LevelBase {
this
.
right
.
interactive
=
false
;
this
.
right
.
interactive
=
false
;
this
.
right
.
eventMode
=
"none"
;
this
.
right
.
eventMode
=
"none"
;
this
.
C
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
[
this
.
A
,
this
.
B
,
this
.
C
].
forEach
((
item
)
=>
{
this
.
C
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
item
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
C
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
item
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
item
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
});
}
}
pos
=
null
;
target
:
Sprite
=
null
;
pos
:
{
x
:
number
,
y
:
number
}
=
null
;
onAPointerUp
(
e
)
{
onAPointerUp
(
e
)
{
this
.
pos
=
null
;
this
.
pos
=
null
;
this
.
target
=
null
;
}
}
onAPointerDown
(
e
)
{
onAPointerDown
(
e
)
{
this
.
target
=
e
.
target
;
const
{
x
,
y
}
=
e
.
data
.
global
;
const
{
x
,
y
}
=
e
.
data
.
global
;
this
.
pos
=
{
this
.
pos
=
{
x
:
x
-
this
.
C
.
x
,
x
:
x
-
e
.
target
.
x
,
y
:
y
-
this
.
C
.
y
y
:
y
-
e
.
target
.
y
}
}
}
}
...
@@ -59,11 +65,13 @@ export class Level13 extends LevelBase {
...
@@ -59,11 +65,13 @@ export class Level13 extends LevelBase {
const
{
x
,
y
}
=
e
.
data
.
global
;
const
{
x
,
y
}
=
e
.
data
.
global
;
const
nx
=
x
-
this
.
pos
.
x
;
const
nx
=
x
-
this
.
pos
.
x
;
const
ny
=
y
-
this
.
pos
.
y
;
const
ny
=
y
-
this
.
pos
.
y
;
this
.
C
.
position
.
set
(
nx
,
ny
);
this
.
target
.
position
.
set
(
nx
,
ny
);
const
{
x
:
cx
,
y
:
cy
}
=
this
.
C
;
if
(
if
(
nx
<
10
||
n
x
>
410
cx
<
10
||
c
x
>
410
||
ny
<
480
||
n
y
>
900
||
cy
<
480
||
c
y
>
900
)
{
)
{
this
.
setTouchEnable
(
false
);
this
.
setTouchEnable
(
false
);
Tween
.
get
(
this
.
right
)
Tween
.
get
(
this
.
right
)
...
...
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