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

Create a filtering mechanism for the GameArea that would enable adding effects to individual Blocks. #350

Closed
adam-arold opened this issue Nov 17, 2020 · 0 comments
Labels
feature New functionality for the program

Comments

@adam-arold
Copy link
Member

this is an example of how such filter would look like. It should be similar to how Modifiers work now, but with the difference that this transformation would have context and state and could be applied for each Block in the visibleArea of a GameArea. The transforming function then would take the Block's position and the size of the visible area of the GameArea.

interface BlockFilter<T: Tile> {

    fun transform(
            visibleSize: Size3D,
            blockPosition: Position3D,
            block: BlockBuilder<T>,
    ): BlockBuilder<T>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality for the program
Projects
None yet
Development

No branches or pull requests

1 participant