mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 17:32:02 +01:00
parent
1f9cc53ce4
commit
afef032acc
26
doc.go
26
doc.go
@ -49,32 +49,6 @@
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// For backward compatibility, you can use a shorthand style Run.
|
||||
//
|
||||
// // update proceeds the game state.
|
||||
// // update is called every frame (1/60 [s]).
|
||||
// func update(screen *ebiten.Image) error {
|
||||
//
|
||||
// // Write your game's logical update.
|
||||
//
|
||||
// if ebiten.IsDrawingSkipped() {
|
||||
// // When the game is running slowly, the rendering result
|
||||
// // will not be adopted.
|
||||
// return nil
|
||||
// }
|
||||
//
|
||||
// // Write your game's rendering.
|
||||
//
|
||||
// return nil
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// // Call ebiten.Run to start your game loop.
|
||||
// if err := ebiten.Run(update, 320, 240, 2, "Your game's title"); err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go'
|
||||
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions that
|
||||
// must be called on the main thread under some conditions (typically, before ebiten.RunGame is called).
|
||||
|
3
run.go
3
run.go
@ -139,6 +139,9 @@ func IsRunningSlowly() bool {
|
||||
}
|
||||
|
||||
// Run starts the main loop and runs the game.
|
||||
//
|
||||
// Deprecated: (as of 1.12.0) Use RunGame instead.
|
||||
//
|
||||
// f is a function which is called at every frame.
|
||||
// The argument (*Image) is the render target that represents the screen.
|
||||
// The screen size is based on the given values (width and height).
|
||||
|
Loading…
Reference in New Issue
Block a user