I'm trying to make a small game where a man shoots "bullets" (which are just circles). I have attempted to make it so when someone drags the mouse, multiple circles will spawn. Currently, the circles only travel when the mouse is released. I added a for loop so when I drag the mouse, 30 circles will spawn (clip size) - but when I test it, the circles may spawn, but the circle only stays next to the man until I release the mouse.
if(drag == true)
{
for(int i = 0; i < 30; i++)
{
gl::color(Color(0, 0, 0));
gl::drawSolidCircle(Vec2f(x, y), 2);
gl::color(Color(1, 1, 1));
}
}
This is my first time creating a game with c++ or cinder, so sorry if I missed something obvious (simply put, I'm very noobish at coding). Thanks in advance!