WoopWoop-Docs
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
WoopWoop.Entity.EntityCreator Class Reference

Class responsible for creating entities and configuring their properties. More...

Public Member Functions

 EntityCreator ()
 Initializes a new instance of the EntityCreator class.
 
Entity Create ()
 Creates and returns the entity configured by this creator.
 
EntityCreator AddComponent< T > ()
 Adds a component of type T to the entity.
 
EntityCreator SetPosition (Vector2 position)
 Sets the position of the entity.
 
EntityCreator SetScale (Vector2 scale)
 Sets the scale of the entity.
 
EntityCreator SetScale (float width, float height)
 Sets the scale of the entity.
 
EntityCreator SetTransformByRectangle (Rectangle rectangle)
 Sets the position and scale of the entity based on a rectangle.
 
EntityCreator SetAngle (float angle)
 Sets the angle of the entity.
 
EntityCreator Tag (string tag)
 Sets the tag for the entity.

Parameters
tagThe requested tag
Returns
This EntityCreator instance.

 
EntityCreator SetEnabled (bool enabled)
 Sets the initial state of the entity.
 

Private Attributes

Entity entityToCreate
 

Detailed Description

Class responsible for creating entities and configuring their properties.

Constructor & Destructor Documentation

◆ EntityCreator()

WoopWoop.Entity.EntityCreator.EntityCreator ( )

Initializes a new instance of the EntityCreator class.

Member Function Documentation

◆ AddComponent< T >()

EntityCreator WoopWoop.Entity.EntityCreator.AddComponent< T > ( )

Adds a component of type T to the entity.

Template Parameters
TThe type of component to add.
Returns
This EntityCreator instance.
Type Constraints
T :Component 
T :new() 

◆ Create()

Entity WoopWoop.Entity.EntityCreator.Create ( )

Creates and returns the entity configured by this creator.

Returns
The created entity.

◆ SetAngle()

EntityCreator WoopWoop.Entity.EntityCreator.SetAngle ( float angle)

Sets the angle of the entity.

Parameters
angleThe angle to set.
Returns
This EntityCreator instance.

◆ SetEnabled()

EntityCreator WoopWoop.Entity.EntityCreator.SetEnabled ( bool enabled)

Sets the initial state of the entity.

Parameters
enabledThe state of the entity
Returns
This EntityCreator instance.

◆ SetPosition()

EntityCreator WoopWoop.Entity.EntityCreator.SetPosition ( Vector2 position)

Sets the position of the entity.

Parameters
positionThe position to set.
Returns
This EntityCreator instance.

◆ SetScale() [1/2]

EntityCreator WoopWoop.Entity.EntityCreator.SetScale ( float width,
float height )

Sets the scale of the entity.

Parameters
widthThe width to set.
heightThe height to set.
Returns
This EntityCreator instance.

◆ SetScale() [2/2]

EntityCreator WoopWoop.Entity.EntityCreator.SetScale ( Vector2 scale)

Sets the scale of the entity.

Parameters
scaleThe scale to set.
Returns
This EntityCreator instance.

◆ SetTransformByRectangle()

EntityCreator WoopWoop.Entity.EntityCreator.SetTransformByRectangle ( Rectangle rectangle)

Sets the position and scale of the entity based on a rectangle.

Parameters
rectangleThe rectangle defining position and scale.
Returns
This EntityCreator instance.

◆ Tag()

EntityCreator WoopWoop.Entity.EntityCreator.Tag ( string tag)

Sets the tag for the entity.

Parameters
tagThe requested tag
Returns
This EntityCreator instance.

Member Data Documentation

◆ entityToCreate

Entity WoopWoop.Entity.EntityCreator.entityToCreate
private

The documentation for this class was generated from the following file: