Skip to content

feat(scene): 添加环绕场景过渡处理器注册功能#41

Merged
GeWuYou merged 1 commit into
mainfrom
feat/scene-around-transition-handler-
Feb 20, 2026
Merged

feat(scene): 添加环绕场景过渡处理器注册功能#41
GeWuYou merged 1 commit into
mainfrom
feat/scene-around-transition-handler-

Conversation

@GeWuYou

@GeWuYou GeWuYou commented Feb 20, 2026

Copy link
Copy Markdown
Owner
  • 实现 RegisterAroundHandler 方法用于注册环绕场景过渡处理器
  • 实现 UnregisterAroundHandler 方法用于注销环绕场景过渡处理器
  • 添加处理器选项配置参数支持
  • 提供完整的环绕处理器生命周期管理功能

Summary by Sourcery

Add support in the scene router for registering and unregistering around-scene transition handlers with optional configuration.

New Features:

  • Introduce RegisterAroundHandler on SceneRouterBase to register around-scene transition handlers with optional handler options.
  • Introduce UnregisterAroundHandler on SceneRouterBase to unregister previously registered around-scene transition handlers.

- 实现 RegisterAroundHandler 方法用于注册环绕场景过渡处理器
- 实现 UnregisterAroundHandler 方法用于注销环绕场景过渡处理器
- 添加处理器选项配置参数支持
- 提供完整的环绕处理器生命周期管理功能
@sourcery-ai

sourcery-ai Bot commented Feb 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Expose registration and unregistration APIs on SceneRouterBase for around-scene transition handlers, delegating to the underlying pipeline with optional handler options, to support full lifecycle management of around transition handlers.

Sequence diagram for registering and unregistering around scene transition handlers

sequenceDiagram
actor Client
participant SceneRouterBase
participant SceneTransitionPipeline
participant ISceneAroundTransitionHandler as AroundHandler
participant SceneTransitionHandlerOptions as HandlerOptions

Client->>SceneRouterBase: RegisterAroundHandler(AroundHandler, HandlerOptions)
SceneRouterBase->>SceneTransitionPipeline: RegisterAroundHandler(AroundHandler, HandlerOptions)
SceneTransitionPipeline-->>Client: registrationCompleted

Client->>SceneRouterBase: UnregisterAroundHandler(AroundHandler)
SceneRouterBase->>SceneTransitionPipeline: UnregisterAroundHandler(AroundHandler)
SceneTransitionPipeline-->>Client: unregistrationCompleted
Loading

Class diagram for new around scene transition handler lifecycle APIs

classDiagram
class SceneRouterBase {
  -SceneTransitionPipeline _pipeline
  +RegisterHandler(ISceneTransitionHandler handler, SceneTransitionHandlerOptions options)
  +UnregisterHandler(ISceneTransitionHandler handler)
  +RegisterAroundHandler(ISceneAroundTransitionHandler handler, SceneTransitionHandlerOptions options)
  +UnregisterAroundHandler(ISceneAroundTransitionHandler handler)
}

class SceneTransitionPipeline {
  +RegisterHandler(ISceneTransitionHandler handler, SceneTransitionHandlerOptions options)
  +UnregisterHandler(ISceneTransitionHandler handler)
  +RegisterAroundHandler(ISceneAroundTransitionHandler handler, SceneTransitionHandlerOptions options)
  +UnregisterAroundHandler(ISceneAroundTransitionHandler handler)
}

interface ISceneTransitionHandler
interface ISceneAroundTransitionHandler
class SceneTransitionHandlerOptions

SceneRouterBase --> SceneTransitionPipeline : uses
SceneTransitionPipeline ..> ISceneTransitionHandler : manages
SceneTransitionPipeline ..> ISceneAroundTransitionHandler : manages
SceneTransitionPipeline ..> SceneTransitionHandlerOptions : configures
Loading

File-Level Changes

Change Details Files
Add around-scene transition handler registration and unregistration methods to the scene router, delegating to the pipeline and supporting optional handler options.
  • Introduce RegisterAroundHandler method that accepts an ISceneAroundTransitionHandler and optional SceneTransitionHandlerOptions and forwards them to the pipeline
  • Introduce UnregisterAroundHandler method that accepts an ISceneAroundTransitionHandler and forwards it to the pipeline
  • Document the new methods with XML comments describing their purpose and parameters
GFramework.Game/scene/SceneRouterBase.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider documenting in the XML comments what happens when options is null (e.g., default behavior or defaults applied) so callers understand how the pipeline treats omitted configuration.
  • If handler is not expected to be null, you may want to add a guard clause or nullable annotation to RegisterAroundHandler/UnregisterAroundHandler to align with how other handler registration methods enforce parameter validity.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider documenting in the XML comments what happens when `options` is `null` (e.g., default behavior or defaults applied) so callers understand how the pipeline treats omitted configuration.
- If `handler` is not expected to be `null`, you may want to add a guard clause or nullable annotation to `RegisterAroundHandler`/`UnregisterAroundHandler` to align with how other handler registration methods enforce parameter validity.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant