Senpai::Components
Code
C++
Game
Transform
Transform(
Vec2<f32> translate = {0.0f, 0.0f},
Vec2<f32> scale = {1.0f, 1.0f},
f32 rotation = 0.0f,
Vec2<f32> rotAnchor = {0.5f, 0.5f}
);
Vec2<f32>& translate();
Vec2<f32>& scale();
Vec2<f32>& rotAnchor();
f32& rotation();Info
Info(String name = "Entity", String tag = "default");TileSet
TileSet(String const& filename, u16 cols, u16 rows, f32 sizeX,
f32 sizeY, String const& name = "");ScriptsHolder
is automatically adden when a script is addet to an entity.
Sprite
Sprite(Ptr<Assets::Texture> assetPtr = nullptr,
Vec2<f32> offset = {0.0f, 0.0f}, Set<Flip> flips = {});Camera
Camera(Vec2<f32> offset = {0, 0}, f32 zoom = 1,
Rectangle<f32> viewport = {{0, 0}, {1, 1}});Animator
Animator(f32 fps = 15, Vector<Ptr<Assets::Animation>> animations = {},
Vector<u32> nextAnimations = {});Light
Light(Ptr<Assets::Texture> assetPtr = nullptr, Set<Flip> flips = {});