Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PropertyAnimationBuilder

[17:7] extends: AnimationBuilder

Wraps FXGL's AnimationBuilder.PropertyAnimationBuilder, the subbuilder returned by AnimationBuilder.animate(property). Pass any JavaFX WritableValue (DoubleProperty, IntegerProperty, StringProperty, ObjectProperty) and use from / to to set the start and end values. Useful for animating arbitrary observable properties such as a custom HUD value or a shape attribute that is not covered by translate / fade / scale / rotate.

Methods

  • PropertyAnimationBuilder ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing PropertyAnimationBuilder AussomJavaObject.

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

    Sets the start value for the animation. The supplied value must be assignable to the property's type.

    • @p Value is the start value (passed straight through to the underlying property).
    • @r this object
  • to (Value)

    Sets the end value for the animation.

    • @p Value is the end value.
    • @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