File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed
src/org/openpatch/scratch Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: Changelog
3
3
index : 4
4
4
---
5
5
6
+ ## 3.3.0
7
+
8
+ - 🚀 Feat: Added ` isSoundPlaying ` and ` stopSound ` to the Sprite and Stage Class.
9
+
6
10
## 3.2.2
7
11
8
12
- 🎨 Visual: Improve Pen rendering
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ source.repository=https://github.com/openpatch/scratch-for-java.git
72
72
73
73
# The version as the user will see it.
74
74
75
- library.prettyVersion =3.2.2
75
+ library.prettyVersion =3.3.0
76
76
77
77
# Additional information for the generated webpage.
78
78
Original file line number Diff line number Diff line change @@ -237,14 +237,16 @@ public void stopSound(String name) {
237
237
238
238
/**
239
239
* Returns true if the sound if playing
240
+ *
240
241
* @return playing
241
242
*/
242
243
public boolean isSoundPlaying (String name ) {
243
- for (Sound sound : sounds ) {
244
- if (sound .getName ().equals (name )) {
245
- return sound .isPlaying ()
246
- }
244
+ for (Sound sound : sounds ) {
245
+ if (sound .getName ().equals (name )) {
246
+ return sound .isPlaying ();
247
247
}
248
+ }
249
+ return false ;
248
250
}
249
251
250
252
public void setTint (int r , int g , int b ) {
Original file line number Diff line number Diff line change @@ -351,14 +351,17 @@ public void stopSound(String name) {
351
351
352
352
/**
353
353
* Returns true if the sound if playing
354
+ *
354
355
* @return playing
355
356
*/
356
357
public boolean isSoundPlaying (String name ) {
357
- for (Sound sound : sounds ) {
358
+ for (Sound sound : sounds ) {
358
359
if (sound .getName ().equals (name )) {
359
- return sound .isPlaying ()
360
+ return sound .isPlaying ();
360
361
}
361
362
}
363
+
364
+ return false ;
362
365
}
363
366
364
367
/**
You can’t perform that action at this time.
0 commit comments