Uses of Class
org.openpatch.scratch.Sprite
Packages that use Sprite
Package
Description
The org.openpatch.scratch package contains classes that provide an API for creating Scratch-like
projects in Java.
-
Uses of Sprite in org.openpatch.scratch
Methods in org.openpatch.scratch with type parameters of type SpriteModifier and TypeMethodDescription<T extends Sprite>
longReturns the number of sprites of the specified class.<T extends Sprite>
longStage.countSpritesOf
(Class<T> c) Returns the number of sprites of the specified class.Find sprites of a given class.Stage.findSpritesOf
(Class<T> c) Find sprites of a given class.<T extends Sprite>
TSprite.getTouchingSprite
(Class<T> c) Returns the first sprite of the specified type that is currently touching this sprite.Sprite.getTouchingSprites
(Class<T> c) Returns a list of sprites of the specified type that are currently touching this sprite.Methods in org.openpatch.scratch that return SpriteMethods in org.openpatch.scratch that return types with arguments of type SpriteModifier and TypeMethodDescriptionStage.getAll()
Retrieves a list of all sprites in the current stage.Methods in org.openpatch.scratch with parameters of type SpriteModifier and TypeMethodDescriptionvoid
Add a sprite object to the stagedouble
Sprite.distanceToSprite
(Sprite sprite) Calculates the Euclidean distance between this sprite and another sprite.void
Stage.goLayersBackwards
(Sprite sprite, int number) Moves the specified sprite backwards by a given number of layers in the sprite list.void
Stage.goLayersForwards
(Sprite sprite, int number) Moves the specified sprite forward by a given number of layers in the sprite list.void
Stage.goToBackLayer
(Sprite sprite) Moves the specified sprite to the back layer of the stage.void
Stage.goToFrontLayer
(Sprite sprite) Moves the specified sprite to the front layer.void
Sprite.goToSprite
(Sprite sprite) Moves this sprite to the position of the specified sprite.void
Stage.goToUILayer
(Sprite sprite) Moves the specified sprite to the UI layer by removing it from the current list of sprites.void
void
void
void
void
void
void
void
void
void
boolean
Sprite.isTouchingSprite
(Sprite sprite) Checks if this sprite is touching another sprite.void
Sprite.pointTowardsSprite
(Sprite s) Points the current sprite towards the specified sprite.void
Removes the specified sprite from the stage.Method parameters in org.openpatch.scratch with type arguments of type SpriteModifier and TypeMethodDescriptionboolean
Sprite.isTouchingSprite
(Class<? extends Sprite> c) Checks if this sprite is touching any sprite of the specified class type.void
Removes all sprites of the specified class from the stage.void
Stage.setSorter
(Comparator<? super Sprite> sorter) Sets a custom sorter for the sprites.Constructors in org.openpatch.scratch with parameters of type Sprite -
Uses of Sprite in org.openpatch.scratch.extensions.animation
Subclasses of Sprite in org.openpatch.scratch.extensions.animationModifier and TypeClassDescriptionclass
The AnimatedSprite class represents a sprite that can play animations. -
Uses of Sprite in org.openpatch.scratch.extensions.pen
Constructors in org.openpatch.scratch.extensions.pen with parameters of type Sprite -
Uses of Sprite in org.openpatch.scratch.extensions.text
Constructors in org.openpatch.scratch.extensions.text with parameters of type Sprite