Overview
GameView is the main rendering view of RareEngine2. It handles rendering the current scene, processing touch input, and running the main game loop. It extends SurfaceView and uses a HandlerThread for managing frame updates.
Field Summary
boolean pausedIndicates if the game loop is currently paused.
Handler hHandler used for scheduling the game loop updates.
long framesFrame counter, tracks how many frames have passed.
HandlerThread threadThread running the rendering loop.
Scene currentSceneCurrent active scene rendered by the engine.
ArrayList<String> layersRendering order of layers like "background", "objects", "ui".
Paint paintPaint object used for rendering watermark and debug info.
Vector2 touchdistTouch distance vector (unused currently).
int touchmilliTouch millisecond tracker (unused currently).
Constant Summary
String REMOVE_WATERMARK_PASSPassword to remove RareEngine2 watermark: "-watermark".
Method Summary
void pause()
Pauses the rendering and game update loop.
void resume()
Resumes the rendering and game update loop.
boolean onTouchEvent(MotionEvent e)
Handles user touch input and dispatches it to the current scene.
void setScene(Scene scene)
Sets the current scene to be rendered and updated.
Scene getCurrentScene()
Returns the current active scene.