mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
gg: mouse_move, mouse_down
This commit is contained in:
parent
21c5ff681b
commit
8c8fe02000
2 changed files with 21 additions and 3 deletions
|
@ -143,7 +143,9 @@ fn (mut game Game) showfps() {
|
|||
ticks := f64(game.second_sw.elapsed().microseconds())/1000.0
|
||||
if ticks > 999.0 {
|
||||
fps := f64(game.frame - game.frame_old)*ticks/1000.0
|
||||
eprintln('fps: ${fps:5.1f} | last frame took: ${last_frame_ms:6.3f}ms | frame: ${game.frame:6} ')
|
||||
$if debug {
|
||||
eprintln('fps: ${fps:5.1f} | last frame took: ${last_frame_ms:6.3f}ms | frame: ${game.frame:6} ')
|
||||
}
|
||||
game.second_sw.restart()
|
||||
game.frame_old = game.frame
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue