void TutorialGame::setPlayerShip(P<PlayerSpaceship> ship) { my_spaceship = ship; my_player_info->setShipId(ship->getMultiplayerId()); if (viewport == nullptr) createScreens(); }
GameApp::GameApp(void) : flScreenWidth(1024), flScreenHeight(640), strGameName("Ping Pong 3D"), bBackgroundSound(true), //Logic(start, options, howto, play, run, pause, over, bsound, asound); logic(true, false, false, false, true, false, false, true, true, flScreenWidth, flScreenHeight), iNumOfSounds(7), iNumOfFonts(1), iNumOfTextures(7) { // Exceptions and bad values are caught/checked inside the functions and printed to stderr. initLibraries(); loadData(); setupRoundParams(); // Set the parameters of all the rounds. createScreens(); registerObservers();// Register observers for the Observer pattern to manage the sound. }