mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 09:08:49 +00:00
feat(app): added interface for the actual renderer delta time
This commit is contained in:
parent
9a47ee7b55
commit
52a234a23e
1 changed files with 5 additions and 0 deletions
|
|
@ -301,6 +301,11 @@ impl App {
|
||||||
self.update_timer
|
self.update_timer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the last frame time as computed by the renderer.
|
||||||
|
pub fn frame_dt(&self) -> f32 {
|
||||||
|
self.delta_time
|
||||||
|
}
|
||||||
|
|
||||||
/// Sets the amount of times the `App` game logic is updated per second
|
/// Sets the amount of times the `App` game logic is updated per second
|
||||||
pub fn set_update_rate(&mut self, update_rate: u32) {
|
pub fn set_update_rate(&mut self, update_rate: u32) {
|
||||||
if update_rate == 0 {
|
if update_rate == 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue