We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Having an instance dedicated to add and remove would remove the branching used and could come with some performance gains.
Also probably some other things to improve like
private fun modifyCardinal(x: Int, y: Int, level: Int, block: Int, add: Boolean) { val flags = collisions.flags[Zone.tileIndex(x, y, level)] ?: return val index = Tile.index(x, y) flags[index] = flags[index] or CollisionFlags.blocked[1 or block] or CollisionFlags.blocked[3 or block] or CollisionFlags.blocked[5 or block] or CollisionFlags.blocked[7 or block] }
The 1,3, 5, 7 could be combined into a single array if block is replaced with some kind of ordinal value
block
The text was updated successfully, but these errors were encountered:
Split GameObjectCollision into two classes closes #474
9265ac8
fde0d64
Successfully merging a pull request may close this issue.
Having an instance dedicated to add and remove would remove the branching used and could come with some performance gains.
Also probably some other things to improve like
The 1,3, 5, 7 could be combined into a single array if
block
is replaced with some kind of ordinal valueThe text was updated successfully, but these errors were encountered: