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.
Provides control over the order in which sprites are drawn.
-
Uses of Sprite in org.openpatch.scratch
Subclasses of Sprite in org.openpatch.scratchModifier and TypeClassDescriptionclassThe AnimatedSprite class represents a sprite that can play animations.classA sprite for buttons, bars and other parts of a user interface.Methods in org.openpatch.scratch with type parameters of type SpriteModifier and TypeMethodDescription<T extends Sprite>
intReturns the number of sprites of the specified class.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 TypeMethodDescriptionvoidAdds a sprite to the stage.doubleSprite.distanceToSprite(Sprite sprite) Calculates the Euclidean distance between this sprite and another sprite.voidSprite.goToSprite(Sprite sprite) Moves this sprite to the position of the specified sprite.booleanSprite.isTouchingSprite(Sprite sprite) Checks if this sprite is touching another sprite.voidSprite.pointTowardsSprite(Sprite s) Points the current sprite towards the specified sprite.voidRemoves the specified sprite from the stage.Method parameters in org.openpatch.scratch with type arguments of type SpriteModifier and TypeMethodDescriptionbooleanSprite.isTouchingSprite(Class<? extends Sprite> c) Checks if this sprite is touching any sprite of the specified class type.voidRemoves all sprites of the specified class from the stage.Constructors in org.openpatch.scratch with parameters of type Sprite -
Uses of Sprite in org.openpatch.scratch.extensions.sorting
Methods in org.openpatch.scratch.extensions.sorting that return types with arguments of type SpriteModifier and TypeMethodDescriptionComparator<? super Sprite>Sorting.getComparator()Returns the order currently used.Method parameters in org.openpatch.scratch.extensions.sorting with type arguments of type SpriteModifier and TypeMethodDescriptionvoidSorting.by(Comparator<? super Sprite> comparator) Draws sprites in an order of your own.