Class RectPrefab

java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.shape.RectPrefab

@Components({RectRenderer.class,Transform.class}) public class RectPrefab extends Prefab
Prefab for 2D rectangles.
  • Field Details

  • Constructor Details

    • RectPrefab

      public RectPrefab(Vector2f size)
    • RectPrefab

      public RectPrefab(Vector2f size, Color color)
  • Method Details

    • setSize

      public void setSize(Vector2f size)
    • setColor

      public void setColor(Color color)
    • apply

      protected void apply(Entity entity)
      Description copied from class: Prefab
      Adds this prefab's predefined components to a given entity and copies values from this prefab.
      Specified by:
      apply in class Prefab