SFML и C++ Уроки \ Разработка игр › Форумы › Домашние задания › Урок 25 ДЗ(1-3) › Ответ в теме: Урок 25 ДЗ(1-3)
C++
1 2 3 4 5 6 7 8 9 10 11 12 |
float timer_sec = 0; float time = 0; while(window.isOpen()) { time = clock.getElapsedTime().asMicroseconds() / 1000.f, clock.restart(); timer_sec += time; if(timer_sec >= 1000) { //Секунда прошла timer_sec = 0; } } |