Skip to content

Commit

Permalink
Fixed trello card about food preset having a too long use duration (#32)
Browse files Browse the repository at this point in the history
* Added Basic Sound On Interactions

- Some notifications will produce a click on closing
- Opening Notifications produce a click
- When an error occurs an error sound will play
- After creating a project an confirmation sound will play

* Added sound to most window button interactions

To Do:
- Add sound to tool bar
- Search and replace needs sound
- Compact Prettier Options need sound
- Better sound implementation (define the source in one place in case a sound wants to be changed)
- Add A system in case too many sounds want to play at once (in case of many errors)

* Built Project

* Audio Manager and Mute Setting

- Added audio manager class to app
- Added settings section and toggle to mute audio manager
- Audio manager only allows 1 sound to play at a time to stop duplicate sounds.
- Audio manager also allows for a global change in volume between all sounds

* Added clicks to a few more elements

- added click to most sidebars
- added clicks to most buttons and toggles

* Updated audio settings tab icon

* Removed Commented Lines And Fixed Mute Button

* Stopped error that was caused by audio manager

I removed the audio manager instance from app.ts and all the lines that are calling an audio from app so I can fix the error in the meantime.

* My Bad I forgot about this part

* This is the last line of code that should give an error

* checkpoint

* found error source

* removed conflict

* fixed conflict again?

* Reverted changes for real

* Removed Commented Lines

* Fixed Audio Manager Mute Setting

Changed en.ts to make mute button more clear. Fixed wierd sound logic when using the mute setting.

* Possible fix for missing audio in build

* potential fix for #30

* Possibly Fixed audio manager looking in wrong directory?

* Delete click5.ogg

* Updated use duration on items

Co-authored-by: solvedDev <33347616+solvedDev@users.noreply.github.com>
  • Loading branch information
outercloudstudio and solvedDev committed Jun 9, 2021
1 parent d82e190 commit 8978ac0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
40 changes: 20 additions & 20 deletions data/packages/minecraftBedrock/preset/item/food/item.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"format_version": "1.16.100",
"minecraft:item": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}",
"category": "nature"
},
"format_version": "1.16.100",
"minecraft:item": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}",
"category": "nature"
},

"components": {
"minecraft:use_duration": 32,
"minecraft:food": {
"nutrition": 4,
"saturation_modifier": "low"
},
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
},
"minecraft:use_animation": "eat",
"minecraft:render_offsets": "apple"
}
}
}
"components": {
"minecraft:use_duration": 1.6,
"minecraft:food": {
"nutrition": 4,
"saturation_modifier": "low"
},
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
},
"minecraft:use_animation": "eat",
"minecraft:render_offsets": "apple"
}
}
}
1 change: 0 additions & 1 deletion src/components/Audio/AudioManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export class AudioManager {
playAudio(audioName = 'click5.ogg', audioVolume = 1) {
const audioPath = process.env.BASE_URL + 'audio/'
if (this.isMuted) return
console.log('PLAYOING')

if (this.currentAudioPlaying) {
if (
Expand Down

0 comments on commit 8978ac0

Please sign in to comment.