/
SN1054NGC
/
DayZ_Projects_cpp
Обзор
Документация
Войти
/
SN1054NGC
/
DayZ_Projects_cpp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
scripts/4_world/classes/mousebuttoninfo.c
48 строк
648 B
SN1054NGC
Initial DayZ mod project commit
26 ноя 2025, 01:03
26 ноя 2025, 01:03
fddb039
Код
Авторство
О чём код?
class MouseButtonInfo { private int m_ButtonID; private int m_TimeLastPress; private int m_TimeLastRelease; void MouseButtonInfo(int button) { m_ButtonID = button; m_TimeLastPress = -1; m_TimeLastRelease = -1; } int GetButtonID() { return m_ButtonID; } int GetTimeLastPress() { return m_TimeLastPress; } int GetTimeLastRelease() { return m_TimeLastRelease; } void Press() { m_TimeLastPress = GetGame().GetTime(); } void Release() { m_TimeLastRelease = GetGame().GetTime(); } bool IsButtonDown() { if ( m_TimeLastRelease < m_TimeLastPress ) { return true; } return false; } }