more complicated viewport resizing logic to make sure viewport offset works

This commit is contained in:
2024-09-21 22:06:48 +10:00
parent 86316ee42c
commit e6690c3e2b
4 changed files with 57 additions and 14 deletions

View File

@ -3,13 +3,13 @@ public protocol GameDelegate {
func fixedUpdate(_ time: GameTime)
func update(_ time: GameTime)
func draw(_ renderer: Renderer, _ time: GameTime)
func resize(_ size: Size<Int>)
func resize(_ frame: Rect<Int>)
}
public extension GameDelegate {
func fixedUpdate(_ time: GameTime) {}
func update(_ time: GameTime) {}
func resize(_ size: Size<Int>) {}
func resize(_ frame: Rect<Int>) {}
}
public struct GameTime {