Sprite

final case
class Sprite[M <: Material](bindingKey: BindingKey, material: M, animationKey: AnimationKey, animationActions: List[AnimationAction], eventHandler: (Rectangle, GlobalEvent) => List[GlobalEvent], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends DependentNode with EventHandler with Cloneable with SpatialModifiers[Sprite[M]]

Sprites are used to represented key-frame animated screen elements.

Companion
object
trait Serializable
trait Product
trait Equals
trait Cloneable
trait SceneNode
class Object
trait Matchable
class Any

Value members

Concrete methods

def changeCycle(label: CycleLabel): Sprite[M]
def flipHorizontal(isFlipped: Boolean): Sprite[M]
def flipVertical(isFlipped: Boolean): Sprite[M]
def jumpToFrame(number: Int): Sprite[M]
def modifyMaterial[MB <: Material](alter: M => MB): Sprite[MB]
def moveBy(pt: Point): Sprite[M]
def moveBy(x: Int, y: Int): Sprite[M]
def moveTo(pt: Point): Sprite[M]
def moveTo(x: Int, y: Int): Sprite[M]
def play(): Sprite[M]
def rotateBy(angle: Radians): Sprite[M]
def rotateTo(angle: Radians): Sprite[M]
def scaleBy(amount: Vector2): Sprite[M]
def scaleBy(x: Double, y: Double): Sprite[M]
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): Sprite[M]
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): Sprite[M]
def withAnimationKey(newAnimationKey: AnimationKey): Sprite[M]
def withBindingKey(newBindingKey: BindingKey): Sprite[M]
def withDepth(newDepth: Depth): Sprite[M]
def withFlip(newFlip: Flip): Sprite[M]
def withMaterial[MB <: Material](newMaterial: MB): Sprite[MB]
def withPosition(newPosition: Point): Sprite[M]
def withRef(newRef: Point): Sprite[M]
def withRef(x: Int, y: Int): Sprite[M]
def withRotation(newRotation: Radians): Sprite[M]
def withScale(newScale: Vector2): Sprite[M]

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Concrete fields

lazy
val x: Int
lazy
val y: Int