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

Author Topic: How to make a vector of circles?  (Read 1364 times)

0 Members and 1 Guest are viewing this topic.

Coakie

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to make a vector of circles?
« on: December 18, 2016, 08:46:49 pm »
I'm trying to make a game in which a bunch of circles spawn and the "player" needs to eat them up. I figured that the best way to do this would be by using a vector, instead of defining them all individually. How do I do this?

I know that I need to do something like this:
        vector<sf::CircleShape> circles;
        circles.resize(10);

How do I add new circles in it, though; and how do I set the properties of the circles

korczurekk

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • Email
Re: How to make a vector of circles?
« Reply #1 on: December 18, 2016, 08:52:23 pm »
It's not really SFML-related problem, maybe like this?

Coakie

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to make a vector of circles?
« Reply #2 on: December 18, 2016, 09:07:29 pm »
Oh, OK. Thanks