Module SypherEngine

Class Component

java.lang.Object
dev.aurumbyte.sypherengine.components.Component
Direct Known Subclasses:
AABB, Animator2D

public abstract class Component extends Object
The base component class, which all components must extend
Since:
v0.3.2
Author:
AurumByte
  • Field Details

    • componentTag

      String componentTag
      The name of the component
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • 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.2
    • 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.2
    • getAABBComponent

      public static AABB getAABBComponent(List<Component> components)

      Getting an AABB component out of all components

      Parameters:
      components - The list of components
      Since:
      0.3.2