-
-
Notifications
You must be signed in to change notification settings - Fork 288
fix: clear animation before exiting #774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @HardyNLee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在解决一个关键问题:当舞台上的背景或立绘等元素被替换时,如果存在未完成的“hold”类型动画,游戏可能会出现卡顿或动画显示不完整的情况。解决方案是在这些元素被替换时,主动清除所有相关的动画,从而确保更流畅的过渡并防止游戏状态不一致。此外,还改进了立绘 ID 的识别和管理逻辑,以提高准确性。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
本次 PR 修复了在舞台对象(如背景、立绘)的资源 URL 变更时,未完成的 hold
类型动画可能导致游戏卡死的问题。通过在 changeBg
和 changeFigure
中强制清除相关动画演出,此问题得到了有效解决。
此外,PR 中有几项值得称赞的重构:
- 新增了
getAnimationPerformName
辅助函数,统一了动画演出名称的生成方式,增强了代码的一致性。 - 对
changeFigure
中目标 ID 的确定逻辑进行了优化,使其更清晰、更易于维护,并使用了常量替代了魔法字符串。
总的来说,这是一次高质量的提交,不仅修复了 Bug,还提升了代码的可读性和健壮性。
const isFreeFigure = key ? true : false; | ||
const id = key ? key : `fig-${pos}`; | ||
let idFromArgs = getStringArgByKey(sentence, 'id') ?? ''; | ||
const isFreeFigure = idFromArgs ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d5b6f95
to
3b417d2
Compare
介绍
修复舞台对象退场时, 有未完成的 hold 类型动画, 而导致 游戏卡死/动画缺失 的问题
主要更改
changeBg
changeFigure
url 变更时, 强制清除动画演出changeFigure
对目标 id 的指定