Class BuiltinSounds
java.lang.Object
org.openpatch.scratch.internal.BuiltinSounds
Registry for the sound effects that ship inside the Scratch for Java jar.
The bundled sounds come from kenney.nl and are released under CC0, so they can be used for any purpose without attribution. They can be addressed by plain name:
sprite.addSound("footstep_carpet_000");
Every bundled sound has a unique name, so no folder has to be given. Lookup ignores case.
-
Method Summary
-
Method Details
-
get
-
contains
Checks whether a bundled sound with this name exists.- Parameters:
name- the name to look for- Returns:
- true if it exists
-
getNames
-
suggest
Finds bundled sound names close to what was typed, so a wrong name can be answered with "did you mean ...?".- Parameters:
name- the name that could not be foundlimit- how many suggestions to return at most- Returns:
- the closest matching names, best first
-