Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: WobbleEffect

[16:7] extends: Effect

Wraps FXGL's WobbleEffect (com.almasb.fxgl.dsl.effects.WobbleEffect), a built-in Effect that slices the entity's Texture into chunks along one axis and oscillates each chunk to create a wobble animation for a fixed duration.

Methods

  • WobbleEffect (TextureObj = null, double DurationSeconds = 1.0, int Radius = 2, int NumChunks = 5, string Orientation = "HORIZONTAL")

    Creates a new WobbleEffect.

    • @p TextureObj is a Texture wrapper for the chunk source.
    • @p DurationSeconds is the effect lifetime in seconds.
    • @p Radius is the per-chunk oscillation radius in pixels.
    • @p NumChunks is the number of slices the texture is cut into.
    • @p Orientation is "HORIZONTAL" or "VERTICAL" (slice axis).
  • adopt (object Ajo)

    Wraps an existing WobbleEffect AussomJavaObject.

  • getTexture ()

    Returns the configured Texture (raw AJO).

  • getRadius ()

    Returns the per-chunk oscillation radius (int).

  • getNumChunks ()

    Returns the number of texture slices (int).

  • getOrientation ()

    Returns the slice-axis Orientation enum AJO.

  • isFinished ()

    Returns true once the effect's duration has elapsed.