|
Aegis2D
Modular C++26 2D game engine for networked games
|
What an entity looks like. More...
#include <aegis2d/ecs/components.hpp>
Public Attributes | |
| std::uint32_t | texture = 0 |
Texture of the resource manager (render::TextureId), 0 for a plain rectangle. | |
| Vec2 | size {} |
| Size on screen, in logical pixels. | |
| std::uint32_t | frame = 0 |
| Frame of the texture's sprite sheet, 0 for the first (or only) frame. | |
| std::int32_t | layer = 0 |
| Drawing order: higher layers are drawn over lower ones. | |
| Vec4 | tint {1.0F, 1.0F, 1.0F, 1.0F} |
RGBA color multiplied with the texture, components in [0, 1]; opaque white keeps it unchanged. | |
What an entity looks like.
Holds only plain data, so the server can create and send it without the render module; the client turns it into a render::Sprite centered on the entity's Transform.
| std::uint32_t aegis2d::ecs::Sprite::frame = 0 |
Frame of the texture's sprite sheet, 0 for the first (or only) frame.
| std::int32_t aegis2d::ecs::Sprite::layer = 0 |
Drawing order: higher layers are drawn over lower ones.
| Vec2 aegis2d::ecs::Sprite::size {} |
Size on screen, in logical pixels.
| std::uint32_t aegis2d::ecs::Sprite::texture = 0 |
Texture of the resource manager (render::TextureId), 0 for a plain rectangle.
| Vec4 aegis2d::ecs::Sprite::tint {1.0F, 1.0F, 1.0F, 1.0F} |
RGBA color multiplied with the texture, components in [0, 1]; opaque white keeps it unchanged.