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
19cac85b
Commit
19cac85b
authored
May 22, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21
parent
4fb4b0a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
99 additions
and
3 deletions
+99
-3
A.png
src/assets/Game/level21/A.png
+0
-0
qs.png
src/assets/Game/level21/qs.png
+0
-0
right.png
src/assets/Game/level21/right.png
+0
-0
title21.png
src/assets/Game/level21/title21.png
+0
-0
Helper.ts
src/core/pixi/Helper.ts
+1
-1
Game.ts
src/pages/GamePage/Game.ts
+2
-1
Level21.ts
src/pages/GamePage/Level/Level21.ts
+94
-0
LevelConfig.ts
src/pages/GamePage/Level/LevelConfig.ts
+2
-1
No files found.
src/assets/Game/level21/A.png
0 → 100644
View file @
19cac85b
38 KB
src/assets/Game/level21/qs.png
0 → 100644
View file @
19cac85b
3.11 KB
src/assets/Game/level21/right.png
0 → 100644
View file @
19cac85b
76.9 KB
src/assets/Game/level21/title21.png
0 → 100644
View file @
19cac85b
4.73 KB
src/core/pixi/Helper.ts
View file @
19cac85b
...
...
@@ -37,7 +37,7 @@ export async function initBundle(): Promise<void> {
manifest
:
manifest
,
skipDetections
:
true
,
preferences
:
{
//
preferWorkers: false,
preferWorkers
:
false
,
// preferCreateImageBitmap: true,
}
});
...
...
src/pages/GamePage/Game.ts
View file @
19cac85b
...
...
@@ -16,6 +16,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
import
gameStore
from
"@/store/gameStore.ts"
;
...
...
@@ -31,7 +32,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
Level2
2
());
this
.
level
=
this
.
addChild
(
new
Level2
1
());
gameStore
.
start
();
...
...
src/pages/GamePage/Level/Level21.ts
0 → 100644
View file @
19cac85b
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
Level21
extends
LevelBase
{
level
:
number
=
21
;
A
:
Sprite
;
B
:
Sprite
;
right
:
Sprite
;
onLoad
()
{
super
.
onLoad
();
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
A
.
position
.
set
(
162
,
835
);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/A.png`
)));
this
.
B
.
position
.
set
(
443
,
835
);
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/right.png`
)));
this
.
right
.
position
.
set
(
452
,
1242
);
this
.
right
.
alpha
=
0
;
this
.
right
.
interactive
=
false
;
this
.
right
.
eventMode
=
"none"
;
[
this
.
A
,
this
.
B
].
forEach
((
item
)
=>
{
item
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
item
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
item
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
});
}
target
=
null
;
pos
=
null
;
onAPointerUp
(
e
)
{
this
.
pos
=
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
.
A
;
const
{
x
:
bx
,
y
:
by
,
width
:
bw
,
height
:
bh
}
=
this
.
B
;
const
edge
=
20
;
const
isIns
=
new
Rectangle
(
ax
+
edge
,
ay
+
edge
,
aw
-
edge
*
2
,
ah
-
edge
*
2
)
.
intersects
(
new
Rectangle
(
bx
+
edge
,
by
+
edge
,
bw
-
edge
*
2
,
bh
-
edge
*
2
));
if
(
isIns
)
{
this
.
setTouchEnable
(
false
);
this
.
right
.
position
.
set
(
bx
-
30
,
by
-
30
);
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 @
19cac85b
...
...
@@ -11,6 +11,7 @@ import { Level10 } from "@/pages/GamePage/Level/Level10.ts";
import
{
Level13
}
from
"@/pages/GamePage/Level/Level13.ts"
;
import
{
Level14
}
from
"@/pages/GamePage/Level/Level14.ts"
;
import
{
Level18
}
from
"@/pages/GamePage/Level/Level18.ts"
;
import
{
Level21
}
from
"@/pages/GamePage/Level/Level21.ts"
;
import
{
Level22
}
from
"@/pages/GamePage/Level/Level22.ts"
;
import
{
Level23
}
from
"@/pages/GamePage/Level/Level23.ts"
;
...
...
@@ -36,7 +37,7 @@ export const LevelArr = [
{
cls
:
Level18
,
tip
:
`移开乌云露出太阳<br/>让冰块融化`
},
{
cls
:
Level14
,
tip
:
`将冰箱放大至能够装下长颈鹿`
},
// 19
{
cls
:
Level14
,
tip
:
`别忘了把题目也装进箱子里`
},
// 20
{
cls
:
Level
14
,
tip
:
`移动鸡蛋,碰一碰便知`
},
// 21
{
cls
:
Level
21
,
tip
:
`移动鸡蛋,碰一碰便知`
},
// 21
{
cls
:
Level22
,
tip
:
`移开圣诞老人的衣服看看`
},
{
cls
:
Level23
,
tip
:
`一样重`
},
{
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