Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Designing a Component-based system  (Read 9277 times)

0 Members and 1 Guest are viewing this topic.

ramaskrik

  • Newbie
  • *
  • Posts: 45
    • View Profile
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?


Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything