Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Commit

Permalink
Add SFX
Browse files Browse the repository at this point in the history
  • Loading branch information
kcgidw committed May 21, 2020
1 parent bc9e98d commit 6e6e0b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
10 changes: 7 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ I'm not actively seeking contributors, but if you have a pull request I'm happy
Some guidelines:

- I'm not seeking additional keyword prompts. There's already a lot!
- UI changes must reasonably accomodate iPhone 5 screens (320x568)
- FAO is simple, not ambitious. The old Crabhat Spyfall webapp was a huge inspiration for me, and it was pretty minimalistic.
- As a rule of thumb, I'm hesitant to make changes, additions, or enforcements to the _rules_ of the game. Think of the people with house rules!
- UI should accomodate iPhone 5 screens (320x568).
- FAO isn't ambitious. The old Crabhat Spyfall webapp was a huge inspiration for me.
- As a loose rule of thumb, I'm hesitant to add to or enforce game rules. This is in line with keeping things minimalistic, and also accommodates for players with house rules.

If you have questions, feel free to email me or create a feature request for discussion.

Expand All @@ -34,3 +34,7 @@ Enjoy the game? Send a tip: [Ko-fi](https://ko-fi.com/krackocloud).
## License

GNU General Public License v3.0

## Credits

Notification SFX from [Material.io](https://material.io/design/sound/sound-resources.html) ([CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/))
6 changes: 6 additions & 0 deletions src/public/js/faq-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<div class="qa">
<h3>Misc. about</h3>
<p>FAO is not affiliated with Oink Games.</p>
<p>
Notification SFX from
<a href="https://material.io/design/sound/sound-resources.html"></a>
(<a href="https://creativecommons.org/licenses/by/4.0/">CC-BY 4.0</a
>)
</p>
<p>
This is a one-man pet project, so I appreciate your patience for
fixes and features.
Expand Down
8 changes: 4 additions & 4 deletions src/public/js/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { generateClientGameState } from './client-game';
import { validateUsername } from '../../common/util';

const socket = io();
// const sfx = new Audio('static/sfx-shake.wav');
const sfx = new Audio('static/notification_simple-01.wav');

const Store = {
state: {
Expand Down Expand Up @@ -88,9 +88,9 @@ function handleSocket(messageName, handler, errHandler) {
? Store.state.gameState.strokes.length
: 0;
Store.setGameState(data.roomState);
// if (prevStrokesLength < data.roomState.strokes.length) {
// sfx.play();
// }
if (prevStrokesLength < data.roomState.strokes.length) {
sfx.play();
}
}
});
}
Expand Down
Binary file added src/public/static/notification_simple-01.wav
Binary file not shown.

0 comments on commit 6e6e0b3

Please sign in to comment.