Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Drawable ¶
type Drawable interface { //Tick(Event) // Method for processing events, e.g. input Draw(*sdl.Renderer) // Method for drawing to the screen }
Drawable represents something that can be drawn, and placed in a Level.
type DynamicPhysical ¶
type DynamicPhysical interface { Position() (int32, int32) // Return position, x and y Size() (int32, int32) // Return width and height Collide(Physical) // Handle collisions with another Physical }
DynamicPhysical represents something that can process its own collisions. Implementing this is an optional addition to Drawable.
type Engine ¶
type Engine struct { Window *sdl.Window Renderer *sdl.Renderer Running bool Event *sdl.Keycode // contains filtered or unexported fields }
func (*Engine) AddEntities ¶
type Physical ¶
type Physical interface { Position() (int32, int32) // Return position, x and y Size() (int32, int32) // Return width and height }
Physical represents something that can collide with another Physical, but cannot process its own collisions. Optional addition to Drawable.
Click to show internal directories.
Click to hide internal directories.