VEGO-Engine  0.1
Loading...
Searching...
No Matches
TransformComponent Class Reference

The transform component is responsible for the position, direction and size of an entity. It is used to move the entity in the game world and to determine its size and position on the screen. More...

#include <TransformComponent.h>

Public Member Functions

 TransformComponent (float scale=1)
 
 TransformComponent (float x, float y, float scale=1)
 
 TransformComponent (float x, float y, int w, int h, float scale=1)
 

Detailed Description

The transform component is responsible for the position, direction and size of an entity. It is used to move the entity in the game world and to determine its size and position on the screen.

Constructor & Destructor Documentation

◆ TransformComponent() [1/3]

TransformComponent::TransformComponent ( float scale = 1)
explicit
Attention
in order to allow an entity to move the stat "speed" must be set in the DataComponent (written exactly like that and set to any positive int value, 0 will lead to no movement, negative numbers to backwards movement)
Parameters
scalebase value is 1 (32x32px), size gets multiplied with scale

◆ TransformComponent() [2/3]

TransformComponent::TransformComponent ( float x,
float y,
float scale = 1 )
Parameters
xx coordinate of spawnposition
yy coordinate of spawnposition
scalebase value is 1 (32x32px per default), size gets multiplied with scale

◆ TransformComponent() [3/3]

TransformComponent::TransformComponent ( float x,
float y,
int w,
int h,
float scale = 1 )
Parameters
xx coordinate of spawnposition
yy coordinate of spawnposition
wadd custom width
hadd custom height
scalebase value is 1 (32x32px per default), size gets multiplied with scale

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