//the game loop, calls all of the supplemental //methods of the application to continuously //update and maintain the functionality of the //game void Application::gameLoop() { while(gameRunning) { handleEnvironment(); updateMonsters(); handleEvents(); updatePlayer(); handleArrows(); handlePhysics(); delta.start(); checkBoundaries(); updateFPS(); updatePoints(); drawSurface(); if(finished) { showFinal(); } } }
void Projectile::update() { handlePhysics(); sprite.update(); sprite.setPosition(position.x, position.y); }