DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Tick()

void AnimatorTimer::Tick ( float timeslice)
inlineprivate

Ticks the timer, is called by timer subsystem.

См. определение в файле tools.c строка 811

812 {
813 if ( !m_active ) return;
814
815 if (m_loop)
816 {
817 m_target_value += m_time * Math.PI2 * timeslice;
818 while (m_target_value > Math.PI2) m_target_value -= Math.PI2;
819
820 m_value = Math.Sin(m_target_value);
821 }
822 else
823 {
824 float diff = Math.AbsFloat(m_target_value - m_value);
825 float step = m_time * timeslice;
826
827 if (diff < step)
828 {
830 m_active = false;
831 }
832 else
833 {
834 if (m_target_value > m_value)
835 {
836 m_value += step;
837 }
838 else
839 {
840 m_value -= step;
841 }
842 }
843 }
844 }
bool m_loop
Определения tools.c:751
bool m_active
Определения tools.c:750
float m_time
Определения tools.c:754
float m_target_value
Определения tools.c:752
float m_value
Определения tools.c:753

Перекрестные ссылки Math::AbsFloat(), m_active, m_loop, m_target_value, m_time, m_value, Math::PI2 и Math::Sin().