mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
40 lines
871 B
C++
40 lines
871 B
C++
/*
|
|
* TurnTimerHandler.h, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
class CStack;
|
|
class PlayerColor;
|
|
struct PlayerState;
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
class CGameHandler;
|
|
|
|
class TurnTimerHandler
|
|
{
|
|
CGameHandler & gameHandler;
|
|
const int turnTimePropagateFrequency = 5000;
|
|
const int turnTimePropagateFrequencyCrit = 1000;
|
|
const int turnTimePropagateThreshold = 3000;
|
|
|
|
public:
|
|
TurnTimerHandler(CGameHandler &);
|
|
|
|
void onGameplayStart(PlayerState & state);
|
|
void onPlayerGetTurn(PlayerState & state);
|
|
void onPlayerMakingTurn(PlayerState & state, int waitTime);
|
|
void onBattleStart();
|
|
void onBattleNextStack(const CStack & stack);
|
|
void onBattleLoop(int waitTime);
|
|
};
|