Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DraggableComponent

[19:7] extends: Component

Wraps FXGL's DraggableComponent (com.almasb.fxgl.dsl.components.DraggableComponent), which lets the user drag the entity by pressing the mouse on its view and moving. Does not work with entities that have a PhysicsComponent. Must be constructed inside a running FXGL game (uses FXGL.getInput()).

Methods

  • DraggableComponent ()

    Creates a new DraggableComponent.

  • adopt (object Ajo)

    Wraps an existing DraggableComponent AussomJavaObject.

  • isDragging ()

    Returns true while the user is dragging the entity.