Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SSIWB2504
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
SSIWB2504
Commits
e7dff08f
Commit
e7dff08f
authored
Aug 15, 2025
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(play): 调整猫咪动画位置并延迟闪光效果
parent
8cd9f868
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
play.component.ts
src/app/play/play.component.ts
+27
-23
No files found.
src/app/play/play.component.ts
View file @
e7dff08f
...
...
@@ -1749,34 +1749,38 @@ export class PlayComponent implements OnInit, OnDestroy {
catWave
.
ref
.
scaleX
=
this
.
g_mapScale
;
catWave
.
ref
.
scaleY
=
this
.
g_mapScale
;
catWave
.
ref
.
x
=
fishX
;
catWave
.
ref
.
y
=
525
*
this
.
g_mapScale
;
catWave
.
ref
.
y
=
600
*
this
.
g_mapScale
;
moveItem
(
catWave
.
ref
,
fishX
,
525
*
this
.
g_mapScale
,
0.1
);
// 渲染猫咪元素,确保在光束和鱼之间
this
.
render
(
catWave
.
ref
,
zIndexMap
.
cat
+
9.5
);
// 创建闪光旋转效果
const
shanGuang
=
this
.
g_cartoon
.
createCartoonElement
(
'
shan_guang
'
,
'
MySprite
'
);
shanGuang
.
ref
.
init
(
this
.
g_cartoon
.
images
.
get
(
'
shan_guang
'
));
shanGuang
.
ref
.
scaleX
=
this
.
g_mapScale
;
shanGuang
.
ref
.
scaleY
=
this
.
g_mapScale
;
shanGuang
.
ref
.
x
=
fishX
;
shanGuang
.
ref
.
y
=
525
*
this
.
g_mapScale
;
this
.
render
(
shanGuang
.
ref
,
zIndexMap
.
cat
+
9.2
);
// 在猫咪动画后面
let
keepRotating
=
true
;
const
rotateShanGuang
=
()
=>
{
if
(
!
keepRotating
)
{
return
;
}
rotateItem
(
shanGuang
.
ref
,
360
,
3
,
()
=>
{
if
(
keepRotating
)
{
shanGuang
.
ref
.
rotation
=
0
;
const
timeoutId
=
setTimeout
(
rotateShanGuang
,
0
);
this
.
m_setTimeoutIDs
.
push
(
timeoutId
);
setTimeout
(()
=>
{
// 创建闪光旋转效果
const
shanGuang
=
this
.
g_cartoon
.
createCartoonElement
(
'
shan_guang
'
,
'
MySprite
'
);
shanGuang
.
ref
.
init
(
this
.
g_cartoon
.
images
.
get
(
'
shan_guang
'
));
shanGuang
.
ref
.
scaleX
=
this
.
g_mapScale
;
shanGuang
.
ref
.
scaleY
=
this
.
g_mapScale
;
shanGuang
.
ref
.
x
=
fishX
;
shanGuang
.
ref
.
y
=
525
*
this
.
g_mapScale
;
this
.
render
(
shanGuang
.
ref
,
zIndexMap
.
cat
+
9.2
);
// 在猫咪动画后面
let
keepRotating
=
true
;
const
rotateShanGuang
=
()
=>
{
if
(
!
keepRotating
)
{
return
;
}
});
};
rotateShanGuang
();
rotateItem
(
shanGuang
.
ref
,
360
,
3
,
()
=>
{
if
(
keepRotating
)
{
shanGuang
.
ref
.
rotation
=
0
;
const
timeoutId
=
setTimeout
(
rotateShanGuang
,
0
);
this
.
m_setTimeoutIDs
.
push
(
timeoutId
);
}
});
};
rotateShanGuang
();
},
100
);
// 创建猫咪帧动画函数
const
playCatAnimation
=
()
=>
{
...
...
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