Skip to content
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

给方案、脚本增加生命周期 #25

Open
zzliux opened this issue Mar 25, 2024 · 0 comments
Open

给方案、脚本增加生命周期 #25

zzliux opened this issue Mar 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zzliux
Copy link
Owner

zzliux commented Mar 25, 2024

提供接口做方案的配置更新:允许在功能(Func)内更新当前方案、更新指定方案,基于该考虑引入生命周期,用以解决以下场景的问题:

  1. 大量的方案配置使得方案管理混乱,需要多个方案配合才能实现流程化操作,基于该考虑引入配置更新简化方案配置,如个人突破卡级方案目前由两个方案切换而来,引入配置回写后一个方案即可实现;
  2. 存在需求方案在停止后需要将配置回写,如六道椒图、六道萤草运行过程中记录的buff数;

方案(Scheme)、脚本(Script)运行的生命周期目前规划以下阶段,在功能(Func)中声明相关函数

  • onScriptStart 脚本运行,允许读写第一个方案的配置、使用Script上下文
  • onSchemeSwitchIn 方案切入,允许读写当前方案的配置、上一个方案的配置、使用Script上下文
  • onSchemeStart 方案运行,允许读写当前方案的配置、使用Script上下文
  • onSchemeStop 方案停止,允许读写当前方案的配置、使用Script上下文
  • onSchemeSwitchOut 方案切出,允许读写当前方案的配置、下一个方案的配置、使用Script上下文
  • onScriptStop 脚本停止,允许读写最后一个方案的配置、使用Script上下文
@zzliux zzliux added the enhancement New feature or request label Mar 25, 2024
@zzliux zzliux changed the title 给方案增加生命周期 给方案、脚本增加生命周期 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant