@urso/core 0.8.27 → 0.8.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.8.27",
3
+ "version": "0.8.28",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -129,19 +129,17 @@ class SoundSprite {
129
129
  };
130
130
 
131
131
  setVolume({ soundKey, volume = 1, saveVolumeState = true }) {
132
- this._soundsState[soundKey].volume = volume;
133
132
  this._player.volume(volume, this._soundsState[soundKey].id);
134
133
 
134
+ if (saveVolumeState) {
135
+ this._soundsState[soundKey].volume = volume;
136
+ }
137
+
135
138
  if (volume === 0) {
136
139
  this._changeSoundMute(true, soundKey);
137
- return;
138
140
  } else if (this._soundsState[soundKey]._muted) {
139
141
  this._changeSoundMute(false, soundKey);
140
142
  }
141
-
142
- if (saveVolumeState) {
143
- this._soundsState[soundKey].volume = volume;
144
- }
145
143
  };
146
144
 
147
145
  setAllVolume(volume) {