mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples/windowsize: Use the screen's Size()
This commit is contained in:
parent
1b86bb9889
commit
4bf3b4e44e
@ -32,8 +32,6 @@ const (
|
||||
|
||||
var (
|
||||
gophersImage *ebiten.Image
|
||||
screenWidth = initScreenWidth
|
||||
screenHeight = initScreenHeight
|
||||
screenScale = initScreenScale
|
||||
keyStates = map[ebiten.Key]int{
|
||||
ebiten.KeyUp: 0,
|
||||
@ -59,7 +57,7 @@ func update(screen *ebiten.Image) error {
|
||||
case 2:
|
||||
d = 16
|
||||
}
|
||||
|
||||
screenWidth, screenHeight := screen.Size()
|
||||
if keyStates[ebiten.KeyUp] == 1 {
|
||||
screenHeight += d
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user