Apologies for the basic/noob question, but I want to understand what's going on since I really have no idea.
I have a player class that accesses sf::Keyboard, and I'm not really sure how it's able to access it and how it gets populated with any sort of data.
void Paddle::update(const float& t, const sf::RenderWindow& window) {
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
xVel = -xSpeed * t;
}
This is an example from Paddle.cpp. The function is called
after window.pollEvent() takes place in Main. I'm just curious how my class, seemingly unconnected to anything, gets access to it and how it is populated with values (because it works wonderfully).