|
|
|
@ -350,6 +350,9 @@ void VirusAttack::InitializeSounds(){ |
|
|
|
|
LoadSound(Sound::TURRET,"turret.mp3"); |
|
|
|
|
LoadSound(Sound::MEMORY_GUARD,"memoryguard.mp3"); |
|
|
|
|
LoadSound(Sound::SPAWN,"spawn.mp3"); |
|
|
|
|
LoadSound(Sound::DEAD1,"dead1.mp3"); |
|
|
|
|
LoadSound(Sound::DEAD2,"dead2.mp3"); |
|
|
|
|
LoadSound(Sound::DEAD3,"dead3.mp3"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool VirusAttack::UnitCreationClickHandled(){ |
|
|
|
@ -899,7 +902,7 @@ bool VirusAttack::OnUserUpdate(float fElapsedTime){ |
|
|
|
|
|
|
|
|
|
std::erase_if(units,[&](std::shared_ptr<Unit>u){ |
|
|
|
|
if(u->GetHealth()==0){ |
|
|
|
|
u->OnDeath(SOUNDS); |
|
|
|
|
u->_OnDeath(SOUNDS); |
|
|
|
|
deathAnimations.emplace_back(std::make_unique<DeathAnimation>(this,u->GetPos(),u->GetImage(),*IMAGES[MATRIX],u->IsFriendly())); |
|
|
|
|
return true; |
|
|
|
|
} else { |
|
|
|
|