Just experimenting with things before setting up a simple state machine. My main class has this OnRender method:
and class Player has this
It works as expected on Desktop target but on HTML the canvas is being cleared every frame (so the text doesn't accumulate). Why is that?
Method OnRender:Int() plyr.RenderPlayer(myCanvas) myCanvas.Flush Return(0) End
Method RenderPlayer:Void(myCanvas: Canvas) myCanvas.SetColor(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255)) myCanvas.DrawText("Player update!", Rnd(0, myCanvas.Width), Rnd(0, myCanvas.Height)) End