Refactor redundant deactivation variable to now be tied to the fade out time. Make collision checks for bullets with radii of 0 no longer occur. Add mid phase tornado. Release Build 9546.

This commit is contained in:
2024-06-02 15:51:35 -05:00
parent 15cf736be0
commit 5f0a516be5
30 changed files with 283 additions and 147 deletions
+4 -6
View File
@@ -48,17 +48,15 @@ Wisp::Wisp(vf2d pos,vf2d vel,float radius,int damage,bool upperLevel,bool friend
void Wisp::Update(float fElapsedTime){
}
bool Wisp::PlayerHit(Player*player){
deactivated=true;
BulletDestroyState Wisp::PlayerHit(Player*player){
SoundEffect::PlaySFX("Wisp Hit",player->GetPos());
game->AddEffect(std::make_unique<Effect>(player->GetPos(),0,"splash_effect.png",upperLevel,player->GetSizeMult(),0.25,vf2d{},"MonsterStrategy.Ursule.Phase 2.Wisp Color"_Pixel));
fadeOutTime="MonsterStrategy.Ursule.Phase 2.Wisp Fadeout Time"_F;
return false;
return BulletDestroyState::KEEP_ALIVE;
}
bool Wisp::MonsterHit(Monster&monster){
deactivated=true;
BulletDestroyState Wisp::MonsterHit(Monster&monster){
SoundEffect::PlaySFX("Wisp Hit",monster.GetPos());
game->AddEffect(std::make_unique<Effect>(monster.GetPos(),0,"splash_effect.png",upperLevel,monster.GetSizeMult(),0.25,vf2d{},"MonsterStrategy.Ursule.Phase 2.Wisp Color"_Pixel));
fadeOutTime="MonsterStrategy.Ursule.Phase 2.Wisp Fadeout Time"_F;
return false;
return BulletDestroyState::KEEP_ALIVE;
}