This function resumes the given Time Source and its children. The given Time Source must have been previously paused using time_source_pause().
time_source_resume(id);
Argument | Type | Description |
---|---|---|
id | Time Source | The Time Source to resume |
N/A
if (keyboard_check_pressed(vk_space))
{
var _state = time_source_get_state(time_source);
if (_state == time_source_state_active)
{
time_source_pause(time_source);
}
else if (_state == time_source_state_paused)
{
time_source_resume(time_source);
}
}
When the Space key is pressed, this code will get a Time Source's state.
When the state is active, it will pause the Time Source, and when it's paused, it will resume it.