Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::client::RenderSystem Class Reference

#include <RenderSystem.hpp>

Inheritance diagram for rtp::client::RenderSystem:
Collaboration diagram for rtp::client::RenderSystem:

Public Member Functions

 RenderSystem (ecs::Registry &r, sf::RenderWindow &window)
 
void update (float dt) override
 Update system logic for one frame.
 
void clearTextureCache ()
 
- Public Member Functions inherited from rtp::ecs::ISystem
virtual ~ISystem () noexcept=default
 

Private Attributes

ecs::Registry_r
 
sf::RenderWindow & _window
 
std::unordered_map< std::string, sf::Texture > _textureCache
 

Detailed Description

Definition at line 30 of file RenderSystem.hpp.

Constructor & Destructor Documentation

◆ RenderSystem()

rtp::client::RenderSystem::RenderSystem ( ecs::Registry r,
sf::RenderWindow &  window 
)
inline

Definition at line 32 of file RenderSystem.hpp.

Member Function Documentation

◆ clearTextureCache()

void rtp::client::RenderSystem::clearTextureCache ( )

Definition at line 14 of file RenderSystem.cpp.

References _textureCache, and rtp::log::info().

Referenced by rtp::client::SpriteCustomizer::clearTextureCaches().

◆ update()

void rtp::client::RenderSystem::update ( float  deltaTime)
overridevirtual

Update system logic for one frame.

Parameters
registryThe entity registry to operate on
deltaTimeTime elapsed since last update in seconds

Implements rtp::ecs::ISystem.

Definition at line 20 of file RenderSystem.cpp.

References _r, _textureCache, _window, rtp::net::Boss, rtp::net::Boss2, rtp::net::BossShield, rtp::log::error(), rtp::client::g_drawDebugBounds, rtp::net::Obstacle, rtp::net::ObstacleSolid, rtp::net::Scout, rtp::net::Tank, rtp::ecs::components::Sprite::texturePath, and rtp::ecs::Registry::zipView().

Member Data Documentation

◆ _r

ecs::Registry& rtp::client::RenderSystem::_r
private

Definition at line 39 of file RenderSystem.hpp.

Referenced by update().

◆ _textureCache

std::unordered_map<std::string, sf::Texture> rtp::client::RenderSystem::_textureCache
private

Definition at line 42 of file RenderSystem.hpp.

Referenced by clearTextureCache(), and update().

◆ _window

sf::RenderWindow& rtp::client::RenderSystem::_window
private

Definition at line 40 of file RenderSystem.hpp.

Referenced by update().


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