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
Separate GameControl from actions and simplify the logic #39
Conversation
Nice, thank you. A few smaller comments, but I like the idea to split the file. Maybe |
Good comments, thanks for your time! Made the changes, feel free to also resolve the threads I created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good.
Love this template a lot, but I feel that
actions.rs
has a lot going on and separation of concerns is in place.So I created a module for the game control. In my projects, the actions and game_control start to grow soon, so having them in different files, to begin with, is helpful.
The current actions logic is also hard to read and manage. I think if the
is_pressed
would just return 1.0 or 0.0, the normalized movement can be calculated fromLeft - Right
orUp-Down
.What do you think?