java.lang.Object
dev.aurumbyte.sypherengine.components.scene.Scene
Direct Known Subclasses:
GameManager

public abstract class Scene extends Object
The base scene class, used throughout...
Since:
v0.3.0
Author:
AurumByte
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) Camera2D
    The scene camera, there's one present for each scene, for custom scene camera transformations.
    The entities present in the scene.
    (package private) String
    The name of the scene, makes it easier for scene switching and management.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Getting the scene's camera.
    Getting the scene's name.
    abstract void
    The abstract initialization method, to be overridden by the user
    abstract void
    The abstract render method, to be overridden by the user
    void
    Setting the scene's camera.
    void
    setSceneName(String sceneName)
    Setting a new name for a scene
    abstract void
    update(float deltaTime)
    The abstract update method, to be overridden by the user

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • sceneName

      String sceneName
      The name of the scene, makes it easier for scene switching and management.
    • entities

      public List<Entity> entities
      The entities present in the scene.
    • camera

      Camera2D camera
      The scene camera, there's one present for each scene, for custom scene camera transformations.
  • Constructor Details

    • Scene

      public Scene()
  • Method Details

    • init

      public abstract void init(SypherEngine engine)

      The abstract initialization method, to be overridden by the user

      Parameters:
      engine - The main engine, used for initializing the game
      Since:
      0.3.0
    • update

      public abstract void update(float deltaTime)

      The abstract update method, to be overridden by the user

      Parameters:
      deltaTime - The deltaTime of the game, kinda useless as the update rates are fixed, but nice to have just in case
      Since:
      0.3.0
    • render

      public abstract void render(SypherEngine engine)

      The abstract render method, to be overridden by the user

      Parameters:
      engine - The main engine, used for rendering purposes the game
      Since:
      0.3.0
    • getSceneName

      public String getSceneName()

      Getting the scene's name.

      Since:
      0.3.0
    • setSceneName

      public void setSceneName(String sceneName)

      Setting a new name for a scene

      Parameters:
      sceneName - The new scene name
      Since:
      0.3.0
    • getCamera

      public Camera2D getCamera()

      Getting the scene's camera.

      Since:
      0.3.0
    • setCamera

      public void setCamera(Camera2D camera)

      Setting the scene's camera.

      Parameters:
      camera - The new scene camera.
      Since:
      0.3.0