Skip to content

Commit

Permalink
ebiten: Deprecate Run
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jun 21, 2020
1 parent 1f9cc53 commit afef032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
26 changes: 0 additions & 26 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
3 changes: 3 additions & 0 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit afef032

Please sign in to comment.