feat: added bird struct and movement, added pause feature, separated fps method to tick()
This commit is contained in:
1 parent
2a728c5fda
commit
e9571d65b4
8 files changed
+42
-12
No files matched your search
+6
-1
@@ -9,10 +9,15 @@ int main() {
|
||||
Input input;
|
||||
Bird bird;
|
||||
bool running = true;
|
||||
bool pause = false;
|
||||
|
||||
std::thread input_thread(&Input::get_input, &input, std::ref(running), std::ref(bird));
|
||||
std::thread input_thread(&Input::get_input, &input, std::ref(running), std::ref(pause), std::ref(bird));
|
||||
|
||||
while (running) {
|
||||
if(pause) {
|
||||
continue;
|
||||
}
|
||||
bird.move();
|
||||
window.update_display(bird);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user