Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::Sprite Struct Reference

Component representing a sprite. More...

#include <Sprite.hpp>

Collaboration diagram for rtp::ecs::components::Sprite:

Public Attributes

std::string texturePath {"0"}
 Identifier for the texture resource.
 
int rectLeft {0}
 Left position of the texture rectangle.
 
int rectTop {0}
 Top position of the texture rectangle.
 
int rectWidth {0}
 Width of the texture rectangle.
 
int rectHeight {0}
 Height of the texture rectangle.
 
int zIndex {0}
 Z-index for rendering order.
 
std::uint8_t opacity {255}
 Opacity of the sprite (0-255)
 
std::uint8_t red {255}
 Red color component.
 
std::uint8_t green {255}
 Green color component.
 
std::uint8_t blue {255}
 Blue color component.
 

Detailed Description

Component representing a sprite.

Note
Actual sprite data (e.g., texture, dimensions) should be defined according to the rendering library used (e.g., SFML, SDL).

Definition at line 21 of file Sprite.hpp.

Member Data Documentation

◆ blue

std::uint8_t rtp::ecs::components::Sprite::blue {255}

Blue color component.

Definition at line 34 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ green

std::uint8_t rtp::ecs::components::Sprite::green {255}

Green color component.

Definition at line 33 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ opacity

std::uint8_t rtp::ecs::components::Sprite::opacity {255}

Opacity of the sprite (0-255)

Definition at line 31 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeParallax().

◆ rectHeight

int rtp::ecs::components::Sprite::rectHeight {0}

Height of the texture rectangle.

Definition at line 27 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().

◆ rectLeft

int rtp::ecs::components::Sprite::rectLeft {0}

Left position of the texture rectangle.

Definition at line 24 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().

◆ rectTop

int rtp::ecs::components::Sprite::rectTop {0}

Top position of the texture rectangle.

Definition at line 25 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().

◆ rectWidth

int rtp::ecs::components::Sprite::rectWidth {0}

Width of the texture rectangle.

Definition at line 26 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().

◆ red

std::uint8_t rtp::ecs::components::Sprite::red {255}

Red color component.

Definition at line 32 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().

◆ texturePath

std::string rtp::ecs::components::Sprite::texturePath {"0"}

Identifier for the texture resource.

Definition at line 22 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), rtp::client::EntityTemplate::makeParallax(), and rtp::client::RenderSystem::update().

◆ zIndex

int rtp::ecs::components::Sprite::zIndex {0}

Z-index for rendering order.

Definition at line 29 of file Sprite.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef(), and rtp::client::EntityTemplate::makeParallax().


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