Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: RotationAnimationBuilder

[15:7] extends: FxObj

Wraps FXGL's AnimationBuilder.RotationAnimationBuilder, the subbuilder returned by AnimationBuilder.rotate(entities). Use from / to to set start and end angles in degrees (2D rotation about the Z axis) and origin to set the rotation pivot, then build or buildAndPlay.

Methods

  • RotationAnimationBuilder ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing RotationAnimationBuilder AussomJavaObject.

    • @p Ajo is an AussomJavaObject around the FXGL subbuilder.
    • @r A new wrapper.
  • from (double Degrees)

    Sets the start angle in degrees (2D rotation about Z).

    • @p Degrees is the start angle.
    • @r this object
  • to (double Degrees)

    Sets the end angle in degrees (2D rotation about Z).

    • @p Degrees is the end angle.
    • @r this object
  • origin (double X, double Y)

    Sets the rotation pivot.

    • @p X is the pivot X.
    • @p Y is the pivot Y.
    • @r this object
  • build ()

    Builds the Animation without playing it.

    • @r An Animation wrapper.
  • buildAndPlay ()

    Builds the Animation and starts it in the scene this builder was created with.

    • @r this object
  • buildAndPlayIn (object SceneObj)

    Builds the Animation and starts it in the supplied scene.

    • @p SceneObj is a Scene wrapper.
    • @r this object