50 lines
817 B
C++
50 lines
817 B
C++
#include "stdafx.h"
|
|
#include "ArenaCountDirecting.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SGameSystem.h"
|
|
#include "CommonUtil.h"
|
|
#include "SStringDB.h"
|
|
#include "SGame.h"
|
|
|
|
extern SGameSystem * g_pCurrentGameSystem;
|
|
|
|
bool sArenaWaitingCountDirecting::isEnable() const
|
|
{
|
|
if (!m_enable)
|
|
return false;
|
|
if (isZero(m_count))
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
void sArenaWaitingCountDirecting::start()
|
|
{
|
|
m_enable = true;
|
|
m_time = 0;
|
|
}
|
|
|
|
void sArenaWaitingCountDirecting::end()
|
|
{
|
|
m_count = 0.0f;
|
|
m_enable = false;
|
|
}
|
|
|
|
void sArenaWaitingCountDirecting::process(unsigned int time, bool& isEnd)
|
|
{
|
|
isEnd = false;
|
|
|
|
unsigned int elapsedTime = 0;
|
|
if (0 != m_time)
|
|
elapsedTime = time - m_time;
|
|
m_time = time;
|
|
|
|
float e = (float)elapsedTime/1000.0f;
|
|
m_count -= e;
|
|
if (0.0f > m_count)
|
|
{
|
|
isEnd = true;
|
|
end();
|
|
}
|
|
}
|