Enemy stops geluid als gedood

This commit is contained in:
Aaldert
2016-06-21 18:23:57 +02:00
parent 9543dd8324
commit 41a81d104e
2 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -27,6 +27,7 @@ Enemy::Enemy(const std::string &fileName,
Enemy::~Enemy()
{
music->Stop();
CrystalPoint::GetSoundSystem().UnloadSound(hit_sound_id);
if (model)
Model::unload(model);
@@ -106,8 +107,6 @@ void Enemy::update(float delta)
{
attack = true;
}
rotation.y = atan2f(dx, dz) * 180 / M_PI;
}
}
+4 -4
View File
@@ -92,10 +92,10 @@
},
"enemies": [
{
"file": "models/squid/Blooper.obj",
"pos": [ 20, 5, 10 ],
"scale": 0.01,
"music": "WAVE/ghostEnemy.wav"
"file": "models/squid/Blooper.obj",
"pos": [ 30, 10, 10 ],
"scale": 0.01,
"music": "WAVE/ghostEnemy.wav"
}],
"crystal": {
"full texture": "models/crystal/Crystal.obj",