This commit is contained in:
Charles 2001-07-03 16:35:22 +00:00
parent 9858004326
commit b8f2d4671a
2 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,7 @@ void CFXBubble::init(DVECTOR const &_Pos)
CurrentScaleX=CurrentScaleY=getRndRange(ONE/2)+(ONE/2); CurrentScaleX=CurrentScaleY=getRndRange(ONE/2)+(ONE/2);
Die=0; Die=0;
XIdx=getRnd()&15; XIdx=getRnd()&15;
Lifetime = 2 * GameState::getOneSecondInFrames();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -32,6 +33,15 @@ void CFXBubble::init(DVECTOR const &_Pos)
int XT[16]={ 0,+1,+0,+1,+0, 0,-1,+0,-1,+0,0,+1,+0,+1,+0,}; int XT[16]={ 0,+1,+0,+1,+0, 0,-1,+0,-1,+0,0,+1,+0,+1,+0,};
void CFXBubble::think(int _frames) void CFXBubble::think(int _frames)
{ {
if (Lifetime > 0)
{
Lifetime -= _frames;
}
else
{
Die = true;
}
if (Die) if (Die)
{ {
if (renderFrame!=FRM__BUBBLEPOP) if (renderFrame!=FRM__BUBBLEPOP)

View file

@ -18,6 +18,7 @@ virtual void killFX();
protected: protected:
s8 Die; s8 Die;
u16 XIdx; u16 XIdx;
s32 Lifetime;
}; };
#endif #endif