A rendering engine library for Go supporting both SDL2 and WebAssembly (HTML Canvas) targets.
Noah Petherbridge
8dfae5b8d8
Fixes: * Move the call to CollidesWithGrid() inside the Canvas instead of outside in the PlayScene.movePlayer() so it can apply to all Actors in motion. * PlayScene.movePlayer() in turn just sets the player's Velocity so the Canvas.Loop() can move the actor itself. * When keeping the player inside the level boundaries: previously it was assuming the player Position was relative to the window, and was checking the WorldIndexAt and getting wrong results. * Canvas scrolling (loopFollowActor): check that the actor is getting close to the screen edge using the Viewport into the world, NOT the screen-relative coordinates of the Canvas bounding boxes. |
||
---|---|---|
sdl | ||
color.go | ||
functions.go | ||
interface.go | ||
point_test.go | ||
point.go | ||
rect_test.go |