Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Designing a Component-based system
Print
Pages:
1
[
2
]
Author
Topic: Designing a Component-based system (Read 9277 times)
0 Members and 1 Guest are viewing this topic.
ramaskrik
Newbie
Posts: 45
Re: Designing a Component-based system
«
Reply #15 on:
February 08, 2016, 10:00:41 pm »
I see now. Storing
std::unique_ptr<sf::Drawable>
in
RenderComponent
sounds good. In that case, however, where should be
sf::Sprite
located? Does it even need to live, as
RenderComponent
has a
unique_ptr
to
sf::Drawable
?
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: Designing a Component-based system
«
Reply #16 on:
February 10, 2016, 10:55:59 am »
The sprite is stored in the unique pointer, of course.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Print
Pages:
1
[
2
]
SFML community forums
»
Help
»
General
»
Designing a Component-based system
anything