Создать ярлык на веб-странице для сохранения удаления

Ну, конечно, вам нужно действительно дождаться, пока> = 1ms не пройдет, прежде чем обновлять ваш последний счетчик галочек

void Application::Update()
{
    Uint32  current_time = SDL_GetTicks();
    Uint32  delta_time = current_time - last_update_time;

    SDL_Event event;
    while(SDL_PollEvent(&event))
    {
        switch(event.type)
        {
            case SDL_QUIT:
            {
                should_close = true;
            }
            break;

            default:
                break;
        }
    }

    if (delta_time >= 1)
    {
        // Update game objects with delta_time

        last_update_time = current_time;
    }   
}
0
задан Im Khan 13 July 2018 в 15:32
поделиться

0 ответов

Другие вопросы по тегам:

Похожие вопросы: