-
Notifications
You must be signed in to change notification settings - Fork 31
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
Changes Made #30
base: master
Are you sure you want to change the base?
Changes Made #30
Conversation
eatSound.play(); | ||
} | ||
|
||
void SoundController::BGM() |
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.
Either Pass status as a param i.ec enum Start/Stop. Or split the method into startBGM
and stopBGM
. Another idea is to rename the method to setBGM(bool)
. Any of these will make the code much more readable and maintainable than a method that toggles state.
items[i].title = MenuText[i]; | ||
items[i].action = action[0]; | ||
} | ||
items[3].action = action[3]; | ||
menu.setMenuItems( items, 4 ); |
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.
Not a problem, just for your knowledge. Such changes (formatting etc) are frowned upon since they pollute the changes to be reviewed in a PR.
// In order for this script to work you will need to add additional dependencies | ||
// properties --> linker --> input --> Additional dependencies --> sfml-audio-d.lib | ||
// whenever setting up project on different system remember to change sound paths | ||
#define eatSoundPath "C:/Users/HP/source/repos/sfml-snake/sounds/bite.wav" |
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.
Hardcoded path. It will not work on any PC other than yours.
// properties --> linker --> input --> Additional dependencies --> sfml-audio-d.lib | ||
// whenever setting up project on different system remember to change sound paths | ||
#define eatSoundPath "C:/Users/HP/source/repos/sfml-snake/sounds/bite.wav" | ||
#define BGMPath "C:/Users/HP/source/repos/sfml-snake/sounds/BGM.wav" |
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.
Use an enum to keep track of different sound assets.
@stelios357 you can update a PR by simply making your changes and pushing them to your remote branch. No need to recreate PR. |
I've made the requested changes, and had made an another PR and clsoed the previous PR.