mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Updated Android (markdown)
parent
4495d27c0f
commit
32f52264c3
35
Android.md
35
Android.md
@ -135,28 +135,27 @@ If you want to center this view, you can set `android:layout_centerHorizontal="t
|
||||
Implement a Renderer class to use for the GLSurfaceView class defined below.
|
||||
|
||||
```java
|
||||
private class EbitenRenderer implements Renderer {
|
||||
private class EbitenRenderer implements Renderer {
|
||||
|
||||
private boolean mErrored;
|
||||
private boolean mErrored;
|
||||
|
||||
@Override
|
||||
public void onDrawFrame(GL10 gl) {
|
||||
if (mErrored) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// onDrawFrame is called every frame.
|
||||
// Let's call your game's Update.
|
||||
Yourgame.Update();
|
||||
} catch (Exception e) {
|
||||
Log.e("Go Error", e.toString());
|
||||
mErrored = true;
|
||||
}
|
||||
@Override
|
||||
public void onDrawFrame(GL10 gl) {
|
||||
if (mErrored) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// onDrawFrame is called every frame.
|
||||
// Let's call your game's Update.
|
||||
Yourgame.Update();
|
||||
} catch (Exception e) {
|
||||
Log.e("Go Error", e.toString());
|
||||
mErrored = true;
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user