Skip to content

Commit

Permalink
📝 update README
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Jan 27, 2024
1 parent 2a86347 commit 528354c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ struct listener {
int main() {
auto gs = game_state{};
auto l = listener{.gs = gs};
auto loop = tw::game_loop{};

auto loop = tw::game_loop{}
loop
.with_fps(60)
.with_ups(50)
.on_setup<&listener::on_setup>(l)
Expand All @@ -115,9 +116,9 @@ int main() {
.on_update<&listener::on_update>(l)
.on_fixed_update<&listener::on_fixed_update>(l)
.on_late_update<&listener::on_late_update>(l)
.on_render<&listener::on_render>(l);
.on_render<&listener::on_render>(l)
.run();

loop.run();
return 0;
}
```
Expand Down Expand Up @@ -171,13 +172,14 @@ struct sdl_backend {
int main() {
auto back = sdl_backend{};
auto loop = tw::game_loop{};
auto loop = tw::game_loop{}
loop
.with_fps(60)
.with_ups(50)
.with_backend(back);
.with_backend(back)
.run();
loop.run();
return 0;
}
```
Expand Down

0 comments on commit 528354c

Please sign in to comment.