void Application::initializeInputSubsystem() { input = shared_ptr<SDLinput>(new SDLinput(genName(), this, joysticks)); registerSubscriber(input.get()); }
void Application::initializeSoundManager() { soundSystem = shared_ptr<SoundSystem>(new SoundSystem(genName(), this)); // soundSystem->playMusic(FileName("data/music/RachelBerkowitz.mp3")); soundSystem->setMute(false); soundSystem->setSoundEffectVolume(0.7f); soundSystem->setMusicVolume(0.0f); registerSubscriber(soundSystem.get()); TRACE("Sound system initialized"); }
tuple<OBJECT_ID, ActorPtr> ActorSet::create() { ActorFactory &factory = getActorFactory(); const tuple<OBJECT_ID, ActorPtr> t = factory.create(); const OBJECT_ID id = t.get<0>(); const ActorPtr actor = t.get<1>(); actors.insert(make_pair(id, actor)); // record it in this actor set registerSubscriber(actor); // record it in the blackboard actor->setParentBlackBoard(this); return t; }
void Application::initializeGameWorld() { // Create the game world world = shared_ptr<World>(new World(genName(), this, renderer, textureFactory, &camera)); registerSubscriber(world.get()); TRACE("Created the game world"); }
void Application::initializeGameStateMachine() { initializeGameWorld(); GameStateMachine *s = new GameStateMachine(genName(), this, g_FrameTimer, kernel, world); gameStateMachine = shared_ptr<GameStateMachine>(s); registerSubscriber(gameStateMachine.get()); TRACE("Game state machine initialized"); }
void Application::initializeRenderer() { renderer = shared_ptr<Renderer>(new Renderer(genName(), this)); registerSubscriber(renderer.get()); TRACE("Renderer initialized"); }