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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Fanjad

Pages: [1]
1
Window / Re: Draw from multiple classes
« on: September 17, 2012, 04:20:39 am »
Thanks a lot :) I will test it as soon as possible :)

/E: Tested your code, but my compiler (MSVC 2010) is not very happy :(
m_drawables.push_back(std::make_unique(Ball));
m_drawables.push_back(std::make_unique(Player));

The compiler doesn't allow type names here. (He even doesn't know make_unique)

2
Window / Draw from multiple classes
« on: September 17, 2012, 02:39:08 am »
Hey guys,

I'm new to SFML and currently trying to draw to one window from multiple classes:
My plan is to create a little "Pong clone" with different classes; one for the window, one for the players and one for the ball (maybe one for collisions, don't mind yet). But I don't know how to draw from the "Player"-class or the "Ball"-Class to the window created by the "Window"-Class. A - very - little example would be extremly helpful :)

Thanks!

Pages: [1]