Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arrows ¶
func Arrows(mvr Mover)
Arrows moves the given mover based on its speed as the arrow keys are pressed
func CenterScreenOn ¶
func CenterScreenOn(mvr Mover)
CenterScreenOn will cause the screen to center on the given mover, obeying viewport limits if they have been set previously
func ShiftX ¶
ShiftX will ShiftX on the vector of the mover and set the renderable and space positions to that of the updated vector.
func ShiftY ¶
ShiftY will ShiftY on the vector of the mover and set the renderable and space positions to that of the updated vector.
Types ¶
type Mover ¶
type Mover interface { Vec() physics.Vector GetRenderable() render.Renderable GetDelta() physics.Vector GetSpace() *collision.Space GetSpeed() physics.Vector }
A Mover can move its position, renderable, and space. Unless otherwise documented, functions effecting a mover move all of its logical position, renderable, and space simultaneously.
Click to show internal directories.
Click to hide internal directories.