r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ecs::StarfieldSystem Class Referencefinal

#include <Starfield.hpp>

+ Inheritance diagram for ecs::StarfieldSystem:
+ Collaboration diagram for ecs::StarfieldSystem:

Public Member Functions

 StarfieldSystem (const std::shared_ptr< eng::IRenderer > &renderer, Registry &registry)
 
 ~StarfieldSystem () override=default
 
 StarfieldSystem (const StarfieldSystem &)=delete
 
StarfieldSystemoperator= (const StarfieldSystem &)=delete
 
 StarfieldSystem (StarfieldSystem &&)=delete
 
StarfieldSystemoperator= (StarfieldSystem &&)=delete
 
void update (Registry &registry, const float dt) override
 
- Public Member Functions inherited from ecs::ASystem
bool isEnable () override
 
void setEnable (const bool enable) override
 
- Public Member Functions inherited from ecs::ISystem
virtual ~ISystem ()=default
 

Static Private Member Functions

static void createStarfield (Registry &registry, const eng::WindowSize &windowSize)
 
static void createStars (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight, const eng::Color &color, float velocity, const std::string &id)
 
static void createShootingStars (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight)
 
static void createPlanets (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight)
 
static void createNebulae (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight)
 
static void createComets (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight)
 
static void createStarsVaried (Registry &registry, const int count, const unsigned int screenWidth, const unsigned int screenHeight, float velocity, const std::string &baseId)
 

Private Attributes

const std::shared_ptr< eng::IRenderer > & m_renderer
 
float m_timeAccumulator = 0.0f
 

Detailed Description

Definition at line 21 of file Starfield.hpp.

Constructor & Destructor Documentation

◆ StarfieldSystem() [1/3]

ecs::StarfieldSystem::StarfieldSystem ( const std::shared_ptr< eng::IRenderer > & renderer,
Registry & registry )
inlineexplicit

Definition at line 24 of file Starfield.hpp.

References createStarfield(), eng::IRenderer::getWindowSize(), and m_renderer.

+ Here is the call graph for this function:

◆ ~StarfieldSystem()

ecs::StarfieldSystem::~StarfieldSystem ( )
overridedefault

◆ StarfieldSystem() [2/3]

ecs::StarfieldSystem::StarfieldSystem ( const StarfieldSystem & )
delete

◆ StarfieldSystem() [3/3]

ecs::StarfieldSystem::StarfieldSystem ( StarfieldSystem && )
delete

Member Function Documentation

◆ createComets()

static void ecs::StarfieldSystem::createComets ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight )
inlinestaticprivate

Definition at line 188 of file Starfield.hpp.

References eng::Color::a, eng::Color::b, ecs::Registry::createEntity(), eng::Color::g, utl::Config::Color::GREEN, eng::Color::r, and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createNebulae()

static void ecs::StarfieldSystem::createNebulae ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight )
inlinestaticprivate

Definition at line 172 of file Starfield.hpp.

References eng::Color::a, eng::Color::b, utl::Config::Color::BLUE_SECOND, ecs::Registry::createEntity(), eng::Color::g, eng::Color::r, and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPlanets()

static void ecs::StarfieldSystem::createPlanets ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight )
inlinestaticprivate

Definition at line 157 of file Starfield.hpp.

References eng::Color::a, eng::Color::b, ecs::Registry::createEntity(), eng::Color::g, utl::Config::Color::PURPLE, eng::Color::r, and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createShootingStars()

static void ecs::StarfieldSystem::createShootingStars ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight )
inlinestaticprivate

Definition at line 142 of file Starfield.hpp.

References eng::Color::a, eng::Color::b, ecs::Registry::createEntity(), eng::Color::g, utl::Config::Color::GREEN, eng::Color::r, and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createStarfield()

static void ecs::StarfieldSystem::createStarfield ( Registry & registry,
const eng::WindowSize & windowSize )
inlinestaticprivate

◆ createStars()

static void ecs::StarfieldSystem::createStars ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight,
const eng::Color & color,
float velocity,
const std::string & id )
inlinestaticprivate

Definition at line 127 of file Starfield.hpp.

References eng::Color::a, eng::Color::b, ecs::Registry::createEntity(), eng::Color::g, eng::Color::r, and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createStarsVaried()

static void ecs::StarfieldSystem::createStarsVaried ( Registry & registry,
const int count,
const unsigned int screenWidth,
const unsigned int screenHeight,
float velocity,
const std::string & baseId )
inlinestaticprivate

Definition at line 204 of file Starfield.hpp.

References ecs::Registry::createEntity(), and ecs::Registry::EntityBuilder::with().

Referenced by createStarfield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

StarfieldSystem & ecs::StarfieldSystem::operator= ( const StarfieldSystem & )
delete

◆ operator=() [2/2]

StarfieldSystem & ecs::StarfieldSystem::operator= ( StarfieldSystem && )
delete

◆ update()

void ecs::StarfieldSystem::update ( Registry & registry,
const float dt )
inlineoverridevirtual

Member Data Documentation

◆ m_renderer

const std::shared_ptr<eng::IRenderer>& ecs::StarfieldSystem::m_renderer
private

Definition at line 109 of file Starfield.hpp.

Referenced by StarfieldSystem(), and update().

◆ m_timeAccumulator

float ecs::StarfieldSystem::m_timeAccumulator = 0.0f
private

Definition at line 110 of file Starfield.hpp.

Referenced by update().


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