forked from metin2/client
Solution refactoring and restructuring, removed Boost dependency, removed unused tools
This commit is contained in:
36
src/GameLib/GameEventManager.cpp
Normal file
36
src/GameLib/GameEventManager.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "StdAfx.h"
|
||||
#include "GameEventManager.h"
|
||||
|
||||
void CGameEventManager::SetCenterPosition(float fx, float fy, float fz)
|
||||
{
|
||||
m_CenterPosition.x = +fx;
|
||||
m_CenterPosition.y = -fy;
|
||||
m_CenterPosition.z = +fz;
|
||||
}
|
||||
|
||||
void CGameEventManager::Update()
|
||||
{
|
||||
}
|
||||
|
||||
void CGameEventManager::ProcessEventScreenWaving(CActorInstance * pActorInstance, const CRaceMotionData::TScreenWavingEventData * c_pData)
|
||||
{
|
||||
TPixelPosition PixelPosition;
|
||||
pActorInstance->GetPixelPosition(&PixelPosition);
|
||||
|
||||
float fdx = PixelPosition.x - m_CenterPosition.x;
|
||||
float fdy = PixelPosition.y - m_CenterPosition.y;
|
||||
float fdz = PixelPosition.z - m_CenterPosition.z;
|
||||
|
||||
if (fdx * fdx + fdy * fdy + fdz * fdz > c_pData->iAffectingRange * c_pData->iAffectingRange)
|
||||
return;
|
||||
|
||||
SetScreenEffectWaving(c_pData->fDurationTime, c_pData->iPower);
|
||||
}
|
||||
|
||||
CGameEventManager::CGameEventManager() : m_CenterPosition(0.0f, 0.0f, 0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
CGameEventManager::~CGameEventManager()
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user