Jerome-Saltmarsh / dart-lemon-engine

A simple canvas and game loop
Other
49 stars 2 forks source link

call `update` callback #5

Open Dan-Crane opened 1 year ago

Dan-Crane commented 1 year ago

When durationPerUpdate is set Duration(milliseconds: 40), the update callback is not called.

(Duration(milliseconds: 40) is default value)

https://github.com/Jerome-Saltmarsh/dart-lemon-engine/assets/56475207/a04522c0-b18c-4be8-b75d-5e5068f5e557

Jerome-Saltmarsh commented 1 year ago

@Dan-Crane Is this still an issue?

Dan-Crane commented 1 year ago

I can't reproduce it right now. Apparently with the latest changes this has been fixed) I don't understand what changing this value does, should it change the number of update callbacks per second?

Jerome-Saltmarsh commented 1 year ago

I'm glad its fixed

setting the durationPerUpdate will change the number of update call backs per second

changing msUpdate will not do anything.

msUpdate represents the actual duration elapsed between updateFrames.