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

Find a way to simplify how to get an image on sprite sheet #6

Open
naulan-chrzaszcz opened this issue Dec 17, 2022 · 0 comments
Open

Comments

@naulan-chrzaszcz
Copy link
Member

naulan-chrzaszcz commented Dec 17, 2022

@staticmethod
def position_platform_on_sheet(type_of_block) -> tuple:
    match type_of_block:
        case TypeOfBlock.TOP:
            return 1, 1
        case TypeOfBlock.BOTTOM:
            return 7, 1
        case TypeOfBlock.LEFT:
            return 8, 1
        case TypeOfBlock.RIGHT:
            return 5, 1
        case TypeOfBlock.CORNER_LEFT_TOP:
            return 0, 1
        # ...

I wrote this function but i'm going to think is dirty

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

No branches or pull requests

1 participant