Class ComplexScene

  • All Implemented Interfaces:
    Renderable, Updatable, Scene

    public abstract class ComplexScene
    extends java.lang.Object
    implements Scene
    Scene that is split into a number of subsystems, which are also represented by scenes. This is typically needed for scenes that contain a significant amount of functionality, in which case the scene can be split into subsystems, with each subsystem corresponding to a functional area, to manage the scene's complexity.
    • Constructor Detail

      • ComplexScene

        public ComplexScene​(Application app)
    • Method Detail

      • start

        public final void start()
        Description copied from interface: Scene
        Initiallization logic that is performed every time the scene is started. Implementing this method is optional, the default implementation does nothing.
        Specified by:
        start in interface Scene
      • initScene

        protected abstract void initScene()
        Initializes the scene itself, before any of its subsystems are started. This method is called every time the scene is started.
      • initSubSystems

        protected abstract java.util.List<Scene> initSubSystems()
        Initializes the list of subsystems that will be used within this scene. This method is called every time the scene is started.
      • update

        public void update​(float deltaTime)
        Description copied from interface: Updatable
        Updates this object for the current frame.
        Specified by:
        update in interface Updatable
        Parameters:
        deltaTime - Elapsed time since the last frame, in seconds.
      • shouldRender

        protected boolean shouldRender​(Scene subSystem)
      • getCanvas

        protected Canvas getCanvas()
      • setBackgroundColor

        public void setBackgroundColor​(ColorRGB backgroundColor)
      • getBackgroundColor

        public ColorRGB getBackgroundColor()