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

📄 laserbeamfx.h

📁 Blood 2全套源码
💻 H
字号:
// ----------------------------------------------------------------------- //
//
// MODULE  : LaserBeamFX.h
//
// PURPOSE : Special FX class for general laser beam FX using models
//
// CREATED : 8/10/98
//
// ----------------------------------------------------------------------- //

#ifndef __LASERBEAM_FX_H__
#define __LASERBEAM_FX_H__

#include "SpecialFX.h"

// ----------------------------------------------------------------------- //

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

	DVector		vSource;
	DVector		vDest;
	DBYTE		nType;
};

// ----------------------------------------------------------------------- //

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

// ----------------------------------------------------------------------- //

class CLaserBeamFX : public CSpecialFX
{
	public :

		CLaserBeamFX() : CSpecialFX() {}

		virtual DBOOL Init(SFXCREATESTRUCT* psfxCreateStruct);
		DBOOL	CreateObject(CClientDE *pClientDE);
		virtual DBOOL Update();

	private :

		void	SetupBeam();
		DBOOL	UpdateBeam();

		DVector		m_vSource;		// Source of the laser
		DVector		m_vDest;		// Destination of the laser

		DFLOAT		m_fMinScale;	// Minimum system radius
		DFLOAT		m_fMaxScale;	// Maximum system radius
		DVector		m_vScale;		// Current scale for the beam

		DFLOAT		m_fDuration;	// Time to make the beam hang around
		DFLOAT		m_fScaleTime;	// Time to scale from min to max
		DFLOAT		m_fFadeTime;	// Time to fade off at the end of lifetime
		DFLOAT		m_fAlpha;		// Alpha for the model

		DBYTE		m_nType;		// Type of laser (BIG, SMALL, COLOR)
		DBYTE		m_bWaveForm;	// Scaling waveform to use

		char		*m_hstrModel;	// Name of the beam model to use
		char		*m_hstrTexture;	// Name of the texture to use

		DFLOAT		m_fStartTime;	// When did we get a trigger message
		DBOOL		m_bFirstUpdate;	// Is it the first update
};

#endif // __LASERBEAM_FX_H__

⌨️ 快捷键说明

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