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
58926671
Commit
58926671
authored
May 29, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
4de28ec8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
18 deletions
+63
-18
right.png
src/assets/Game/level14/right.png
+0
-0
Game.ts
src/pages/GamePage/Game.ts
+2
-2
Level11.ts
src/pages/GamePage/Level/Level11.ts
+33
-3
Level14.ts
src/pages/GamePage/Level/Level14.ts
+28
-13
No files found.
src/assets/Game/level14/right.png
View replaced file @
4de28ec8
View file @
58926671
209 KB
|
W:
|
H:
207 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/pages/GamePage/Game.ts
View file @
58926671
...
@@ -48,10 +48,10 @@ export class Game extends Base {
...
@@ -48,10 +48,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 Level7
(this.setPauseCd));
this
.
level
=
this
.
addChild
(
new
Level14
(
this
.
setPauseCd
));
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
globalEvent
.
on
(
GameEvent
.
NextLevel
,
this
.
nextLevel
,
this
);
this
.
nextLevel
();
//
this.nextLevel();
this
.
startCd
();
this
.
startCd
();
}
}
...
...
src/pages/GamePage/Level/Level11.ts
View file @
58926671
...
@@ -9,6 +9,7 @@ export class Level11 extends LevelBase {
...
@@ -9,6 +9,7 @@ export class Level11 extends LevelBase {
level
:
number
=
11
;
level
:
number
=
11
;
A
:
Sprite
;
A
:
Sprite
;
B
:
Sprite
;
right
:
Sprite
;
right
:
Sprite
;
error
:
Sprite
;
error
:
Sprite
;
...
@@ -22,14 +23,14 @@ export class Level11 extends LevelBase {
...
@@ -22,14 +23,14 @@ export class Level11 extends LevelBase {
onLoad
()
{
onLoad
()
{
super
.
onLoad
();
super
.
onLoad
();
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/长颈鹿.png`
)))
.
position
.
set
(
91
,
765
);
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/冰箱.png`
)));
this
.
A
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/冰箱.png`
)));
this
.
A
.
anchor
.
set
(
0.5
);
this
.
A
.
anchor
.
set
(
0.5
);
this
.
A
.
position
.
set
(
541
,
956
);
this
.
A
.
position
.
set
(
541
,
956
);
this
.
A
.
scale
.
set
(
0.5746031746031746
);
this
.
A
.
scale
.
set
(
0.5746031746031746
);
this
.
B
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`level
${
this
.
level
}
/长颈鹿.png`
)));
this
.
B
.
position
.
set
(
91
,
765
);
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`common/right.png`
)));
this
.
right
=
this
.
addChild
(
new
Sprite
(
Assets
.
get
(
`common/right.png`
)));
this
.
right
.
position
.
set
(
642
,
1141
);
this
.
right
.
position
.
set
(
642
,
1141
);
this
.
right
.
alpha
=
0
;
this
.
right
.
alpha
=
0
;
...
@@ -40,8 +41,37 @@ export class Level11 extends LevelBase {
...
@@ -40,8 +41,37 @@ export class Level11 extends LevelBase {
this
.
A
.
on
(
"globalpointermove"
,
this
.
onPointerMove
,
this
);
this
.
A
.
on
(
"globalpointermove"
,
this
.
onPointerMove
,
this
);
this
.
A
.
on
(
"pointerup"
,
this
.
onPointerUp
,
this
);
this
.
A
.
on
(
"pointerup"
,
this
.
onPointerUp
,
this
);
this
.
A
.
on
(
"pointerupoutside"
,
this
.
onPointerUp
,
this
);
this
.
A
.
on
(
"pointerupoutside"
,
this
.
onPointerUp
,
this
);
this
.
B
.
on
(
"pointerdown"
,
this
.
onBPointerDown
,
this
);
this
.
B
.
on
(
"pointerup"
,
this
.
onBPointerUp
,
this
);
this
.
B
.
on
(
"globalpointermove"
,
this
.
onBPointerMove
,
this
);
}
pos
=
null
;
onBPointerUp
(
e
)
{
this
.
pos
=
null
;
}
onBPointerDown
(
e
)
{
const
{
x
,
y
}
=
e
.
data
.
global
;
this
.
pos
=
{
x
:
x
-
this
.
B
.
x
,
y
:
y
-
this
.
B
.
y
}
}
}
onBPointerMove
(
e
)
{
if
(
!
this
.
pos
)
return
;
const
{
x
,
y
}
=
e
.
data
.
global
;
const
nx
=
x
-
this
.
pos
.
x
;
const
ny
=
y
-
this
.
pos
.
y
;
this
.
B
.
position
.
set
(
nx
,
ny
);
}
onPointerDown
(
e
)
{
onPointerDown
(
e
)
{
console
.
log
(
"pointerdown"
,
e
.
pointerId
,
e
.
data
.
global
);
console
.
log
(
"pointerdown"
,
e
.
pointerId
,
e
.
data
.
global
);
...
...
src/pages/GamePage/Level/Level14.ts
View file @
58926671
import
{
LevelBase
}
from
"@/pages/GamePage/Components/LevelBase.ts"
;
import
{
LevelBase
}
from
"@/pages/GamePage/Components/LevelBase.ts"
;
import
{
Assets
,
Sprite
}
from
"pixi.js"
;
import
{
Assets
,
Rectangle
,
Sprite
}
from
"pixi.js"
;
import
{
Ease
,
Tween
}
from
"@/core/tween"
;
import
{
Ease
,
Tween
}
from
"@/core/tween"
;
import
{
GameEvent
,
globalEvent
}
from
"@/pages/GamePage/GameEvent.ts"
;
import
{
GameEvent
,
globalEvent
}
from
"@/pages/GamePage/GameEvent.ts"
;
import
{
errorWaitTime
,
rightWaitTime
}
from
"@/pages/GamePage/Level/LevelConfig.ts"
;
import
{
errorWaitTime
,
rightWaitTime
}
from
"@/pages/GamePage/Level/LevelConfig.ts"
;
...
@@ -44,6 +44,10 @@ export class Level14 extends LevelBase {
...
@@ -44,6 +44,10 @@ export class Level14 extends LevelBase {
this
.
A
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
A
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
A
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
this
.
A
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
this
.
A
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
this
.
A
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
this
.
B
.
on
(
"pointerdown"
,
this
.
onAPointerDown
,
this
);
this
.
B
.
on
(
"pointerup"
,
this
.
onAPointerUp
,
this
);
this
.
B
.
on
(
"globalpointermove"
,
this
.
onAPointerMove
,
this
);
}
}
onTapOption
(
item
:
Sprite
)
{
onTapOption
(
item
:
Sprite
)
{
...
@@ -69,6 +73,7 @@ export class Level14 extends LevelBase {
...
@@ -69,6 +73,7 @@ export class Level14 extends LevelBase {
});
});
}
}
target
=
null
;
pos
=
null
;
pos
=
null
;
onAPointerUp
(
e
)
{
onAPointerUp
(
e
)
{
...
@@ -76,10 +81,11 @@ export class Level14 extends LevelBase {
...
@@ -76,10 +81,11 @@ export class Level14 extends LevelBase {
}
}
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
.
A
.
x
,
x
:
x
-
e
.
target
.
x
,
y
:
y
-
this
.
A
.
y
y
:
y
-
e
.
target
.
y
}
}
}
}
...
@@ -88,18 +94,27 @@ export class Level14 extends LevelBase {
...
@@ -88,18 +94,27 @@ export class Level14 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
.
A
.
position
.
set
(
nx
,
ny
);
this
.
target
.
position
.
set
(
nx
,
ny
);
if
(
this
.
check
();
nx
>=
420
}
&&
nx
<=
540
&&
ny
>=
930
check
()
{
&&
ny
<=
1120
const
{
x
:
ax
,
y
:
ay
,
width
:
aw
,
height
:
ah
}
=
this
.
A
;
)
{
const
{
x
:
bx
,
y
:
by
,
width
:
bw
,
height
:
bh
}
=
this
.
B
;
const
aRect
=
new
Rectangle
(
ax
,
ay
,
aw
,
ah
);
const
bRect
=
new
Rectangle
(
bx
,
by
,
bw
,
bh
);
if
(
aRect
.
intersects
(
bRect
))
{
this
.
setPauseCd
(
true
);
this
.
setPauseCd
(
true
);
this
.
setTouchEnable
(
false
);
this
.
setTouchEnable
(
false
);
Tween
.
get
(
this
.
B
)
.
to
({
x
:
306
,
y
:
1000
},
444
,
Ease
.
quadInOut
)
Tween
.
get
(
this
.
A
)
Tween
.
get
(
this
.
A
)
.
to
({
x
:
484
,
y
:
1040
},
444
,
Ease
.
quadInOut
)
.
to
({
x
:
292
,
y
:
1040
},
444
,
Ease
.
quadInOut
)
.
call
(()
=>
{
.
call
(()
=>
{
Tween
.
get
(
this
.
right
)
Tween
.
get
(
this
.
right
)
.
to
({
alpha
:
1
},
444
,
Ease
.
quadInOut
)
.
to
({
alpha
:
1
},
444
,
Ease
.
quadInOut
)
...
@@ -108,8 +123,8 @@ export class Level14 extends LevelBase {
...
@@ -108,8 +123,8 @@ export class Level14 extends LevelBase {
globalEvent
.
emit
(
GameEvent
.
NextLevel
);
globalEvent
.
emit
(
GameEvent
.
NextLevel
);
});
});
})
})
}
}
}
}
onDestroy
()
{
onDestroy
()
{
...
...
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