Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TimeComponent

[18:7] extends: DoubleComponent

Wraps FXGL's TimeComponent (com.almasb.fxgl.entity.components.TimeComponent), a per- entity time-scale multiplier that lets the engine apply slow- motion / fast-forward / freeze on a single entity without changing the global game timer. Default value is 1.0 (real-time).

Methods

  • TimeComponent (double Value = 1.0)

    Creates a new TimeComponent with the given time-scale multiplier.

    • @p Value is the time multiplier (1.0 = real-time, 0.0 = frozen, 2.0 = double-speed).
  • adopt (object Ajo)

    Wraps an existing TimeComponent AussomJavaObject.

  • getValue ()

    Returns the current time-scale.

  • setValue (double Value)

    Sets the time-scale.

  • valueProperty ()

    Returns the DoubleProperty for binding.

  • copy ()

    Returns a deep copy of this TimeComponent. Used by the engine when cloning entities. The copy has its own independent DoubleProperty.