ebiten: add comments about termination

This commit is contained in:
Hajime Hoshi 2022-08-22 23:30:19 +09:00
parent 141d64b0f5
commit fc5cef124f

3
run.go
View File

@ -188,6 +188,9 @@ func (i *imageDumperGame) Layout(outsideWidth, outsideHeight int) (screenWidth,
// use errors.Is when you check the returned error is the error you want, rather than comparing the values // use errors.Is when you check the returned error is the error you want, rather than comparing the values
// with == or != directly. // with == or != directly.
// //
// If you want to terminate a game on desktops, it is totally fine to define your own error value, return it at
// Update, and check whether the returned error value from RunGame is the same as the value you defined.
//
// The size unit is device-independent pixel. // The size unit is device-independent pixel.
// //
// Don't call RunGame twice or more in one process. // Don't call RunGame twice or more in one process.