JScratch
Loading...
Searching...
No Matches
generated.Sprite1 Class Reference
Inheritance diagram for generated.Sprite1:
com.jscratch.Sprite com.jscratch.ScratchObject

Public Member Functions

 Sprite1 ()
Public Member Functions inherited from com.jscratch.Sprite
 Sprite (String name)
void setStage (Stage stage)
double getX ()
double getY ()
double getScaleX ()
double getScaleY ()
double getWidth ()
double getHeight ()
void whenClicked (Runnable action)
void whenScaleChanged (java.util.function.BiConsumer< Double, Double > action)
boolean containsPoint (int mx, int my)
void handleMouseClick (int mx, int my)
void handleScaleChange (double oldScale, double newScale)
void draw (Graphics2D g)
double width ()
double height ()
void setScaleX (double sx)
void setScaleY (double sy)
Rectangle getBounds ()
void move (double steps)
void turnRight (double deg)
void turnLeft (double deg)
void pointInDirection (double dir)
void goTo (double x, double y)
void changeXBy (double dx)
void changeYBy (double dy)
void glide (double sec, double tx, double ty)
void goToRandomPosition ()
void ifOnEdgeBounce ()
void setEffect (String effect, double value)
void changeEffectBy (String effect, double amount)
void clearGraphicsEffects ()
void say (String text)
void say (String text, double sec)
void switchCostume (String n)
void nextCostume ()
void setSize (double s)
void changeSizeBy (double a)
void show ()
void hide ()
boolean isVisible ()
void addCostume (Costume c)
boolean isTouching (Sprite o)
boolean isTouchingColor (Color c)
void setRotationStyle (RotationStyle s)
Object getVariable (String name)
Public Member Functions inherited from com.jscratch.ScratchObject
 ScratchObject (String name)
String getName ()
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)

Public Attributes

int i = 9

Additional Inherited Members

Static Public Member Functions inherited from com.jscratch.Sprite
static BufferedImage createPlaceholder (Color c, int w, int h)
Protected Member Functions inherited from com.jscratch.ScratchObject
double castToDouble (Object o)
String castToString (Object o)
Protected Attributes inherited from com.jscratch.ScratchObject
String name
Map< String, Object > variables = new ConcurrentHashMap<>()
Map< String, List< Object > > lists = new ConcurrentHashMap<>()
double volume = 100
List< Thread > activeScripts = new CopyOnWriteArrayList<>()

Detailed Description

Definition at line 7 of file Sprite1.java.

Constructor & Destructor Documentation

◆ Sprite1()

generated.Sprite1.Sprite1 ( )

Definition at line 9 of file Sprite1.java.

Member Data Documentation

◆ i

int generated.Sprite1.i = 9

Definition at line 32 of file Sprite1.java.


The documentation for this class was generated from the following file: