OpenAl Werkt! en Setup enzo
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
World::World(const std::string &fileName)
|
||||
World::World(const std::string &fileName):
|
||||
music_id(-1)
|
||||
{
|
||||
//Store player instance
|
||||
player = Player::getInstance();
|
||||
@@ -113,6 +114,15 @@ World::World(const std::string &fileName)
|
||||
enemies.push_back(new Enemy(e["file"].asString(), position, rotation, scale));
|
||||
|
||||
}
|
||||
|
||||
if (!v["world"]["music"].isNull())
|
||||
{
|
||||
music_id = CrystalPoint::GetSoundSystem().LoadSound(v["world"]["music"].asString().c_str(), true);
|
||||
Sound* music = CrystalPoint::GetSoundSystem().GetSound(music_id);
|
||||
music->SetPos(Vec3f(), Vec3f());
|
||||
music->Play();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user