mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
237498e51f
This change adds an optional function Draw to the Game interface. With Draw function, the game logic and rendering are separate. There are some benefits: * The API is clearer and easier to understand. * When TPS < FPS, smoother rendering can be performed without changing the game logic depending on TPS. * Porting to XNA, which has separate functions Update and Draw, would be a little easier. Draw is optional due to backward compatibility. Game interface was already used before v1.11.x in mobile packages, and adding a function would break existing code unfortunately. Then, we adopted switching the behavior based on whether Draw is implemented or not by type assertions. IsDrawingSkipped will always return false when Draw is implemented. Fixes #1104 |
||
---|---|---|
.. | ||
main.go |