mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
cmd/ebitenmobile: Rename onPause/onResume to suspendGame/resumeGame
Fixes #894
This commit is contained in:
parent
c648b40e20
commit
1acf110078
@ -321,18 +321,26 @@ public class EbitenView extends ViewGroup {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPause() {
|
// suspendGame suspends the game.
|
||||||
|
// It is recommended to call this when the application is being suspended e.g.,
|
||||||
|
// Activity's onPause is called.
|
||||||
|
public void suspendGame() {
|
||||||
if (initialized_) {
|
if (initialized_) {
|
||||||
ebitenSurfaceView_.onPause();
|
ebitenSurfaceView_.onPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onResume() {
|
// resumeGame resumes the game.
|
||||||
|
// It is recommended to call this when the application is being resumed e.g.,
|
||||||
|
// Activity's onResume is called.
|
||||||
|
public void resumeGame() {
|
||||||
if (initialized_) {
|
if (initialized_) {
|
||||||
ebitenSurfaceView_.onResume();
|
ebitenSurfaceView_.onResume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// onErrorOnGameUpdate is called on the main thread when an error happens when updating a game.
|
||||||
|
// You can define your own error handler, e.g., using Crashlytics, by overwriting this method.
|
||||||
protected void onErrorOnGameUpdate(Exception e) {
|
protected void onErrorOnGameUpdate(Exception e) {
|
||||||
Log.e("Go", e.toString());
|
Log.e("Go", e.toString());
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user