Class Entity2DPrefab

java.lang.Object
com.xebisco.yield.Entity2DPrefab

public class Entity2DPrefab extends Object
The Entity2DPrefab class is a blueprint for creating 2D entities with components, children, and tags.
  • Constructor Details

    • Entity2DPrefab

      public Entity2DPrefab(Entity2DPrefab[] children, ComponentCreation... components)
      The constructor that initializes the Entity2DPrefab with children and components.
      Parameters:
      children - The array of Entity2DPrefab objects representing the children of the entity.
      components - The array of ComponentCreation objects representing the components of the entity.
    • Entity2DPrefab

      public Entity2DPrefab(Entity2DPrefab[] children, String[] tags, ComponentCreation... components)
      The constructor that initializes the Entity2DPrefab with children, components, and tags.
      Parameters:
      children - The array of Entity2DPrefab objects representing the children of the entity.
      tags - The array of strings representing the tags of the entity.
      components - The array of ComponentCreation objects representing the components of the entity.
    • Entity2DPrefab

      public Entity2DPrefab(ComponentCreation... components)
    • Entity2DPrefab

      public Entity2DPrefab(String[] tags, ComponentCreation... components)
      The constructor that initializes the Entity2DPrefab with components.
      Parameters:
      components - The array of ComponentCreation objects representing the components of the entity.
  • Method Details

    • components

      public ComponentCreation[] components()
      The function returns an array of ComponentCreation objects.
      Returns:
      An array of ComponentCreation objects representing the components of the entity.
    • children

      public Entity2DPrefab[] children()
      The function returns an array of 2D entity prefabs that are children of a parent entity.
      Returns:
      An array of Entity2DPrefab objects representing the children of the entity.
    • tags

      public String[] tags()
      The function returns an array of strings representing tags.
      Returns:
      An array of strings representing the tags of the entity.