Class ShapePrefab<S extends Shape>

java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.shape.ShapePrefab<S>
Direct Known Subclasses:
RectPrefab

public class ShapePrefab<S extends Shape> extends Prefab
  • Field Details

  • Constructor Details

    • ShapePrefab

      public ShapePrefab(S shape)
    • ShapePrefab

      public ShapePrefab(S shape, Color color)
    • ShapePrefab

      public ShapePrefab(S shape, String texturePath)
    • ShapePrefab

      public ShapePrefab(S shape, TextureAsset texture)
    • ShapePrefab

      public ShapePrefab(S shape, String texturePath, Color color)
    • ShapePrefab

      public ShapePrefab(S shape, TextureAsset texture, Color color)
  • Method Details

    • setShape

      public void setShape(S shape)
    • setTexture

      public void setTexture(TextureAsset texture)
    • setColor

      public void setColor(Color color)
    • createRenderer

      protected ShapeRenderer<S> createRenderer(S shape, TextureAsset texture, 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.
      Overrides:
      apply in class Prefab