Files

30 lines
691 B
C
Raw Permalink Normal View History

2023-10-04 06:01:28 +08:00
#pragma once
#include "head.h"
class _GameTimer {
2023-10-04 22:49:16 +08:00
public:
2023-10-04 06:01:28 +08:00
float m_flTime;
float m_flLastExecute = -1;
bool m_bRepeat;
bool m_bPreserveMapChange;
2023-10-04 22:49:16 +08:00
lua_State* m_luaVm;
int m_iParamIndex;
int m_iLuaCallBackFn;
};
class _GameTickRunTime {
public:
lua_State* m_luaVm;
2023-10-04 06:01:28 +08:00
int m_iParamIndex;
int m_iLuaCallBackFn;
};
namespace GameTimer {
auto AddTimer(_GameTimer* timer) -> int;
auto CleanUpTimers() -> void;
auto ExcuteTimers() -> void;
}; // namespace GameTimer
2023-10-04 22:49:16 +08:00
namespace GameTickRunTime {
auto AddTickFunction(_GameTickRunTime* timer) -> void;
auto CleanUpTickFunctions() -> void;
auto ExcuteTickFunctions() -> void;
}; // namespace GameTickRunTime