Class Scene

java.lang.Object
buildengine.utils.Holder<Actor>
buildengine.engine.stage.scene.Scene

public class Scene extends Holder<Actor>
A scene is responsible for holding data like a container (no functionality). The scene holds a list of Actors, Directors, UIElements and some basic systems like physics, renderer and collisions. See respectable classes for functionality.
See Also:
  • Constructor Details

  • Method Details

    • addDirector

      public void addDirector(Director... directors)
    • addDirector

      public void addDirector(Director director)
    • removeDirector

      public void removeDirector(Director director)
    • getDirectors

      public List<Director> getDirectors()
    • addElement

      public void addElement(UIElement element)
    • removeElement

      public void removeElement(UIElement element)
    • add

      public void add(Actor actor)
      Adds an actor to the scene. Updates the scene object of the actor and automatically activates it.
      Overrides:
      add in class Holder<Actor>
    • getList

      public List<Actor> getList()
      Creates a list containing all the actors (destroyed actors excluded).
      Overrides:
      getList in class Holder<Actor>
      Returns:
      a list of all actors in the scene.
    • getActiveList

      public List<Actor> getActiveList()
      Creates a list containing all the active actors (= the actors to be updated).
      Returns:
      a list of all active actors in the scene.
    • select

      public List<Actor> select(Vector2f point)
    • getComponents

      public <U> List<U> getComponents(Class<U> classType)
      List all ACTIVE components with type U
      Type Parameters:
      U - The type of component
      Parameters:
      classType - The class of the component
      Returns:
      a list of all actor components in this scene of type U
    • getCursorPosition

      public Vector2f getCursorPosition()
    • getCollisions

      public CollisionRegisterer getCollisions()
    • getPhysics

      public Physics getPhysics()
    • getElements

      public List<UIElement> getElements()
    • getName

      public String getName()
    • getCamera

      public Camera getCamera()
    • getRenderer

      public Renderer getRenderer()
    • toString

      public String toString()
      Overrides:
      toString in class Object