This commit is contained in:
parent
7e521cc0bf
commit
01fca54fb1
9 changed files with 91 additions and 5 deletions
|
@ -30,6 +30,7 @@ void CFXSteam::init(DVECTOR const &_Pos)
|
|||
ShadeDec=DefShadeDec;
|
||||
DieOut=false;
|
||||
SetSize(DefSize);
|
||||
IsHorizontal=false;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -47,6 +48,13 @@ void CFXSteam::SetSize(int Size)
|
|||
BaseVel.vy=-Size;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CFXSteam::SetVel(DVECTOR const &Velocity)
|
||||
{
|
||||
BaseVel.vx=Velocity.vx;
|
||||
BaseVel.vy=Velocity.vy;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CFXSteam::killFX()
|
||||
{
|
||||
|
@ -70,7 +78,14 @@ void CFXSteam::think(int _frames)
|
|||
if (!DieOut)
|
||||
{ // Replace Head
|
||||
DVECTOR Vel=BaseVel;
|
||||
Vel.vx+=getRndRange(3)-1;
|
||||
if ( IsHorizontal )
|
||||
{
|
||||
Vel.vy+=getRndRange(3)-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vel.vx+=getRndRange(3)-1;
|
||||
}
|
||||
|
||||
sList &Head=moveHead();
|
||||
Head.Ofs=Vel;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define __FX_FX_STEAM_HEADER__
|
||||
|
||||
#include "fx/fx.h"
|
||||
#include "fx/fxbasetrail.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CFXSteam : public CFXBaseTrail
|
||||
|
@ -17,12 +18,15 @@ virtual void think(int _frames);
|
|||
virtual void killFX();
|
||||
|
||||
void SetSize(int Size);
|
||||
void SetVel(DVECTOR const &Velocity);
|
||||
void SetHorizontal(bool newHorizontal) {IsHorizontal=newHorizontal;}
|
||||
|
||||
protected:
|
||||
DVECTOR BaseVel;
|
||||
s16 ScaleInc;
|
||||
s16 ShadeDec;
|
||||
bool DieOut;
|
||||
bool IsHorizontal;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue