Muziek toegvoegt aan world en enemy

This commit is contained in:
Aaldert
2016-06-21 18:15:49 +02:00
parent d56625e19a
commit 9543dd8324
9 changed files with 12 additions and 18 deletions
+1 -2
View File
@@ -219,8 +219,7 @@
<Media Include="WAVE\Crystal.wav" />
<Media Include="WAVE\ghostEnemy.wav" />
<Media Include="WAVE\portal.wav" />
<Media Include="WAVE\test1.wav" />
<Media Include="WAVE\test2.wav" />
<Media Include="WAVE\world1.wav" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
+2 -5
View File
@@ -207,16 +207,13 @@
<Media Include="WAVE\Crystal.wav">
<Filter>Resource Files</Filter>
</Media>
<Media Include="WAVE\ghostEnemy.wav">
<Filter>Resource Files</Filter>
</Media>
<Media Include="WAVE\portal.wav">
<Filter>Resource Files</Filter>
</Media>
<Media Include="WAVE\test1.wav">
<Media Include="WAVE\ghostEnemy.wav">
<Filter>Resource Files</Filter>
</Media>
<Media Include="WAVE\test2.wav">
<Media Include="WAVE\world1.wav">
<Filter>Resource Files</Filter>
</Media>
</ItemGroup>
+1 -7
View File
@@ -27,10 +27,9 @@ Enemy::Enemy(const std::string &fileName,
Enemy::~Enemy()
{
CrystalPoint::GetSoundSystem().UnloadSound(hit_sound_id);
if (model)
Model::unload(model);
CrystalPoint::GetSoundSystem().UnloadSound(hit_sound_id);
}
void Enemy::draw()
@@ -106,11 +105,6 @@ void Enemy::update(float delta)
else
{
attack = true;
if (music->IsPlaying() == true)
{
// music->Pause();
music->Stop();
}
}
rotation.y = atan2f(dx, dz) * 180 / M_PI;
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
+5 -1
View File
@@ -314,8 +314,12 @@ void World::update(float elapsedTime)
count++;
}
if(remove)
if (remove)
{
delete enemies[count];
enemies.erase(enemies.begin() + count);
}
skybox->update(elapsedTime, maxEnemies - enemies.size(), maxEnemies);
+2 -2
View File
@@ -3,7 +3,7 @@
"heightmap": "worlds/rockHeightmap.png",
"texture": "worlds/rockStone2.png",
"skybox": "skyboxes/water/",
"music": "WAVE/test2.wav",
"music": "WAVE/world1.wav",
"object-templates": [
{
"color": 50,
@@ -95,7 +95,7 @@
"file": "models/squid/Blooper.obj",
"pos": [ 20, 5, 10 ],
"scale": 0.01,
"music": "WAVE/enemy.wav"
"music": "WAVE/ghostEnemy.wav"
}],
"crystal": {
"full texture": "models/crystal/Crystal.obj",
+1 -1
View File
@@ -9,7 +9,7 @@
"collision": true
}
],
"music": "WAVE/test1.wav"
"music": "WAVE/world1.wav"
},
"player": {
"startposition": [ 20, 5, 20 ]