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

Author Topic: Can you declare two shapes in one class and draw them both such as.  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

Darkpony

  • Newbie
  • *
  • Posts: 7
    • View Profile
Can i create two shapes with sfml and draw them together all in the same class?


void TowerA::draw(sf::RenderWindow & window)
{
   window.draw(sprite)
   window.draw(circle)
   window.draw(circle2)
}
   

JayhawkZombie

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Can you declare two shapes in one class and draw them both such as.
« Reply #1 on: April 23, 2017, 05:10:55 am »
Yes.  If they're on top of each other, the last one that gets drawn wins, so just draw them in the right order.