Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GameSubScene

[18:7] extends: FxglSubScene

Wraps FXGL's GameSubScene (com.almasb.fxgl.app.scene.GameSubScene), a SubScene that hosts its own GameScene (with a dedicated GameWorld and PhysicsWorld). Useful for split-screen, picture-in-picture, or nested game views distinct from the primary GameScene. Construction needs the SceneService's pixelsPerMeter, so it can only be instantiated inside a running FXGL engine.

Methods

  • GameSubScene (Width = null, int Height = 0, bool Is3D = false)

    Creates a new GameSubScene of the given size. Pass null for Width to construct an empty wrapper for adopt.

    • @p Width is the sub-scene width in pixels, or null.
    • @p Height is the sub-scene height in pixels.
    • @p Is3D is true for a 3D game scene, false for 2D.
  • adopt (object Ajo)

    Wraps an existing GameSubScene AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a GameSubScene.
    • @r A new wrapper.
  • getGameScene ()

    Returns the inner GameScene that drives the sub-scene.

    • @r An AussomJavaObject around a GameScene.
  • getGameWorld ()

    Returns the inner GameWorld.

    • @r An AussomJavaObject around a GameWorld.
  • getPhysicsWorld ()

    Returns the inner PhysicsWorld.

    • @r An AussomJavaObject around a PhysicsWorld.