fix(canvas): emit should call with view as this
fix(sample): 贪吃蛇重力感应版: some typo and bugs
This commit is contained in:
@@ -77,7 +77,7 @@ public class ScriptCanvasView extends SurfaceView implements SurfaceHolder.Callb
|
||||
canvas = holder.lockCanvas();
|
||||
scriptCanvas.setCanvas(canvas);
|
||||
scriptCanvas.drawColor(Color.WHITE);
|
||||
emit("draw", scriptCanvas, this);
|
||||
emit("draw", scriptCanvas, ScriptCanvasView.this);
|
||||
holder.unlockCanvasAndPost(canvas);
|
||||
canvas = null;
|
||||
long dt = mTimePerDraw - (SystemClock.uptimeMillis() - time);
|
||||
|
||||
Reference in New Issue
Block a user