📄 soundeffectunitdesc.cpp
字号:
// SoundEffectUnitDesc.cpp: implementation of the CSoundEffectUnitDesc class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "SoundEffectUnitDesc.h"
#include "SoundEffectUnit.h"
#include "..\MHFile.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMemoryPoolTempl<CSoundEffectUnit>* CSoundEffectUnitDesc::m_pUnitPool = NULL;
CSoundEffectUnitDesc::CSoundEffectUnitDesc(BOOL bDangledToOperator)
: CEffectUnitDesc(eEffectUnit_Sound,bDangledToOperator)
{
if(m_pUnitPool == NULL)
{
m_pUnitPool = new CMemoryPoolTempl<CSoundEffectUnit>;
m_pUnitPool->Init(50,5,"CSoundEffectUnit");
}
m_SoundNum = 0;
}
CSoundEffectUnitDesc::~CSoundEffectUnitDesc()
{
if(m_pUnitPool)
{
m_pUnitPool->Release();
delete m_pUnitPool;
m_pUnitPool = NULL;
}
}
void CSoundEffectUnitDesc::DoParseScript(char* szKey,CMHFile* pFile)
{
CMD_ST(szKey);
CMD_CS("#SOUNDNUM")
m_SoundNum = pFile->GetWord();
CMD_EN
}
CEffectUnit* CSoundEffectUnitDesc::GetEffectUnit(EFFECTPARAM* pEffectParam)
{
CSoundEffectUnit* pEffectUnit = m_pUnitPool->Alloc();
pEffectUnit->Initialize(this,pEffectParam);
return pEffectUnit;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -