void Game::spawnBall() { Ball* ball = new Ball("ball.png", (float)(drawManager->getWidth() * 0.5) - 10, (float)(drawManager->getHeight() - 50 - 20), 20, 20); ball->Create(spriteManager, 0, 0); ball->setMaxSpeed(Config::getFloat("ball_max_speed", 30.0f)); ball->setSpeed(Config::getFloat("ball_default_speed", 15.0f)); float x_direction = Config::getFloat("start_balls_widex", 8.0f); ball->setDirection(Utils::Random::frandom(-x_direction, x_direction), -1.0f); ball->freeze(); balls.push_back(ball); }