Skip to content

Middleware Priority #23

@hatmatty

Description

@hatmatty

Middlewares need some way to have a priority, for instance think of this scenario:

You want to have a middleware that stops a player from swinging when they try, so you attach to the SwingMiddleware and immediately call End on the swing middleware when a person releases their draw. Functionally this works, however there's a problem, you may still hear the sword "swoosh" sound and you get the camera shake. This is because your middleware could possibly have been added after the sound effects middleware, making your stop() command useless to stoping that middleware from running since it has already ran by the time your middleware is called. This poses a glaring bug which can be fixed if middlewares can be given "priorites" when added so that the middleware I add can be given the highest priority to run before the sound middleware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    back-endThis change is primarily for the back-endenhancementNew feature or requestlow priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions