⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smoketrailfx.h

📁 Blood 2全套源码
💻 H
字号:
// ----------------------------------------------------------------------- //
//
// MODULE  : SmokeTrailFX.h
//
// PURPOSE : SmokeTrail special fx class - Definition
//
// CREATED : 10/21/97
//
// ----------------------------------------------------------------------- //

#ifndef __SMOKE_TRAIL_FX_H__
#define __SMOKE_TRAIL_FX_H__

#include "SpecialFX.h"


struct STCREATESTRUCT : public SFXCREATESTRUCT
{
	STCREATESTRUCT::STCREATESTRUCT();

	DVector vVel;
	DBOOL   bSmall;
};

inline STCREATESTRUCT::STCREATESTRUCT()
{
	memset(this, 0, sizeof(STCREATESTRUCT));
}

class CSmokeTrailFX : public CSpecialFX
{
	public :

		CSmokeTrailFX() : CSpecialFX() 
		{
			VEC_INIT(m_vLastPos);
			VEC_INIT(m_vVel);
			VEC_INIT(m_vColor1);
			VEC_INIT(m_vColor2);

			m_fStartTime	= -1.0f;
			m_fLifeTime		= 0.0f;
			m_fFadeTime		= 0.0f;
			m_fOffsetTime	= 0.0f;
			m_nNumPerPuff	= 1;
			m_fSegmentTime	= 1.0f;
			m_bSmall		= DFALSE;
		}

		virtual DBOOL Init(SFXCREATESTRUCT* psfxCreateStruct);
		virtual DBOOL Update();

	private :

		DVector	m_vLastPos;		// Last smoke particle position
		DVector	m_vVel;			// Velocity of smoking projectile
		DVector	m_vColor1;		// Color of darkest smoke particles
		DVector	m_vColor2;		// Color of lightest smoke particles

		DFLOAT	m_fSegmentTime;	// When should we create a new segment
		DFLOAT	m_fFadeTime;	// When should segment start to fade
		DFLOAT	m_fLifeTime;	// How long segment stays around
		DFLOAT	m_fStartTime;	// When did we start this crazy thing
		DFLOAT	m_fOffsetTime;	// Time between particles

		int		m_nNumPerPuff;	// Number of particles per smoke puff
		DBOOL	m_bSmall;		// Relative size of smoke
};

#endif // __SMOKE_TRAIL_FX_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -