|
| | ScratchObject (String name) |
| String | getName () |
| Object | getVariable (String name) |
| void | setVariable (String name, Object value) |
| double | getVariableAsNumber (String name) |
| String | getVariableAsString (String name) |
| String | answer () |
| void | changeVariableBy (String name, double amount) |
| List< Object > | getList (String name) |
| void | addToList (String listName, Object item) |
| void | deleteFromList (String listName, int index) |
| Object | itemOfList (String listName, int index) |
| int | pickRandom (int min, int max) |
| String | join (Object a, Object b) |
| String | letterOf (int index, String text) |
| int | lengthOf (String text) |
| void | startScript (Runnable script) |
| void | broadcast (String message) |
| void | whenIReceive (String message, Runnable action) |
| void | whenKeyPressed (int keyCode, Runnable action) |
| void | waitTillNextFrame () |
| void | wait (double sec) |
| void | playSound (String soundPath) |
| void | stopAllSounds () |
| void | setVolume (double percent) |
|
| String | name |
| Map< String, Object > | variables = new ConcurrentHashMap<>() |
| Map< String, List< Object > > | lists = new ConcurrentHashMap<>() |
| double | volume = 100 |
| List< Thread > | activeScripts = new CopyOnWriteArrayList<>() |
|
| List< javax.sound.sampled.Clip > | activeClips = new java.util.concurrent.CopyOnWriteArrayList<>() |
Definition at line 9 of file ScratchObject.java.
◆ ScratchObject()
| com.jscratch.ScratchObject.ScratchObject |
( |
String | name | ) |
|
◆ addToList()
| void com.jscratch.ScratchObject.addToList |
( |
String | listName, |
|
|
Object | item ) |
◆ answer()
| String com.jscratch.ScratchObject.answer |
( |
| ) |
|
◆ broadcast()
| void com.jscratch.ScratchObject.broadcast |
( |
String | message | ) |
|
◆ castToDouble()
| double com.jscratch.ScratchObject.castToDouble |
( |
Object | o | ) |
|
|
protected |
◆ castToString()
| String com.jscratch.ScratchObject.castToString |
( |
Object | o | ) |
|
|
protected |
◆ changeVariableBy()
| void com.jscratch.ScratchObject.changeVariableBy |
( |
String | name, |
|
|
double | amount ) |
◆ deleteFromList()
| void com.jscratch.ScratchObject.deleteFromList |
( |
String | listName, |
|
|
int | index ) |
◆ getList()
| List< Object > com.jscratch.ScratchObject.getList |
( |
String | name | ) |
|
◆ getName()
| String com.jscratch.ScratchObject.getName |
( |
| ) |
|
◆ getVariable()
| Object com.jscratch.ScratchObject.getVariable |
( |
String | name | ) |
|
◆ getVariableAsNumber()
| double com.jscratch.ScratchObject.getVariableAsNumber |
( |
String | name | ) |
|
◆ getVariableAsString()
| String com.jscratch.ScratchObject.getVariableAsString |
( |
String | name | ) |
|
◆ itemOfList()
| Object com.jscratch.ScratchObject.itemOfList |
( |
String | listName, |
|
|
int | index ) |
◆ join()
| String com.jscratch.ScratchObject.join |
( |
Object | a, |
|
|
Object | b ) |
◆ lengthOf()
| int com.jscratch.ScratchObject.lengthOf |
( |
String | text | ) |
|
◆ letterOf()
| String com.jscratch.ScratchObject.letterOf |
( |
int | index, |
|
|
String | text ) |
◆ pickRandom()
| int com.jscratch.ScratchObject.pickRandom |
( |
int | min, |
|
|
int | max ) |
◆ playSound()
| void com.jscratch.ScratchObject.playSound |
( |
String | soundPath | ) |
|
◆ setVariable()
| void com.jscratch.ScratchObject.setVariable |
( |
String | name, |
|
|
Object | value ) |
◆ setVolume()
| void com.jscratch.ScratchObject.setVolume |
( |
double | percent | ) |
|
◆ startScript()
| void com.jscratch.ScratchObject.startScript |
( |
Runnable | script | ) |
|
◆ stopAllSounds()
| void com.jscratch.ScratchObject.stopAllSounds |
( |
| ) |
|
◆ wait()
| void com.jscratch.ScratchObject.wait |
( |
double | sec | ) |
|
◆ waitTillNextFrame()
| void com.jscratch.ScratchObject.waitTillNextFrame |
( |
| ) |
|
◆ whenIReceive()
| void com.jscratch.ScratchObject.whenIReceive |
( |
String | message, |
|
|
Runnable | action ) |
◆ whenKeyPressed()
| void com.jscratch.ScratchObject.whenKeyPressed |
( |
int | keyCode, |
|
|
Runnable | action ) |
◆ activeClips
| List<javax.sound.sampled.Clip> com.jscratch.ScratchObject.activeClips = new java.util.concurrent.CopyOnWriteArrayList<>() |
|
private |
◆ activeScripts
| List<Thread> com.jscratch.ScratchObject.activeScripts = new CopyOnWriteArrayList<>() |
|
protected |
◆ lists
| Map<String, List<Object> > com.jscratch.ScratchObject.lists = new ConcurrentHashMap<>() |
|
protected |
◆ name
| String com.jscratch.ScratchObject.name |
|
protected |
◆ variables
| Map<String, Object> com.jscratch.ScratchObject.variables = new ConcurrentHashMap<>() |
|
protected |
◆ volume
| double com.jscratch.ScratchObject.volume = 100 |
|
protected |
The documentation for this class was generated from the following file: