eliasreid / rad-shooter

Simply c++ arcade-y shooting game using SDL. WIP, no installer
1 stars 0 forks source link

Make a timer class #3

Closed eliasreid closed 4 years ago

eliasreid commented 4 years ago

Should be able to reduce code like this: auto current_time = std::chrono::high_resolution_clock::now(); auto time_since_prev = std::chrono::duration_cast<std::chrono::milliseconds>(current_time-prev_hit_time_).count(); to something like this: ` int delta = timer_.GetDelta()'

by creating a timer class, that others can have as members.

eliasreid commented 4 years ago

Needs to have a pause function.

eliasreid commented 4 years ago

9