82 lines
1.7 KiB
C++
82 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "K3DTypes.h"
|
|
#include "SGameAvatarAddOnMgr.h"
|
|
|
|
class KSeqModel;
|
|
|
|
const int c_nMaxForceSphere = 10;
|
|
|
|
class SGameForceSphereFX : public SGameAvatarAddOnMgr
|
|
{
|
|
private:
|
|
enum FORCE_SPHERE_STEP
|
|
{
|
|
STEP_00 = 0,
|
|
STEP_01,
|
|
STEP_02,
|
|
STEP_03,
|
|
STEP_04,
|
|
};
|
|
|
|
struct S_FORCE_SPHERE
|
|
{
|
|
KSeqModel* m_pForceSphere;
|
|
K3DVector m_vPosition;
|
|
DWORD m_dwTimeLeft;
|
|
FORCE_SPHERE_STEP m_nStep;
|
|
bool m_bUseRot;
|
|
|
|
DWORD m_dwOldArrayTime;
|
|
|
|
float m_fBeZ;
|
|
float m_fAfZ;
|
|
float m_fCurZ;
|
|
|
|
S_FORCE_SPHERE()
|
|
{
|
|
m_pForceSphere = NULL;
|
|
m_vPosition = K3DVector( 10.f, 0.f, 10.f );
|
|
|
|
m_dwTimeLeft = 0;
|
|
m_nStep = STEP_00;
|
|
|
|
m_bUseRot = false;
|
|
m_dwOldArrayTime = 0;
|
|
|
|
m_fBeZ = 0.f;
|
|
m_fAfZ = 0.f;
|
|
m_fCurZ = 0.f;
|
|
}
|
|
};
|
|
|
|
std::vector< S_FORCE_SPHERE > m_sForceSphere;
|
|
|
|
DWORD m_dwVisibleTime; ///< 사라질때 시간
|
|
bool m_bIsEnd; //
|
|
float m_fRotation;
|
|
float m_fRotationSpeed; ///< 기공 회전 속도
|
|
DWORD m_dwTime;
|
|
DWORD m_dwOldTime;
|
|
DWORD m_dwArrayTime; ///< 정렬되는 시간
|
|
float m_fSphereDistance; ///< 기공 캐릭터와의 거리
|
|
float m_fSphereHeight; ///< 기공 높이
|
|
|
|
public:
|
|
void AddForceSphere();
|
|
void ArrayForceSphere();
|
|
void UseForceSphere();
|
|
float floatLinear( float v0, float v1, float t );
|
|
void UseRotation( S_FORCE_SPHERE* pForceSphere );
|
|
int GetForceSphereSize();
|
|
int GetSize() { return (int)m_sForceSphere.size(); }
|
|
public:
|
|
void SetSphereHeight( float fHeight );
|
|
void SetSphereDistance( float fDistance );
|
|
public:
|
|
void Process( DWORD dwTime );
|
|
virtual void Render( class KViewportObject** ppViewportList, int nViewportCount );
|
|
public:
|
|
SGameForceSphereFX();
|
|
virtual ~SGameForceSphereFX();
|
|
}; |