Documentation ¶
Index ¶
- type Config
- func (c Config) ShowCursor() bool
- func (c Config) Size() (width, height int)
- func (c Config) Title() string
- func (c Config) Windowed() bool
- func (c Config) WithFullScreen() Config
- func (c Config) WithHiddenCursor() Config
- func (c Config) WithSize(width, height int) Config
- func (c Config) WithTitle(title string) Config
- func (c Config) WithVisibleCursor() Config
- func (c Config) WithWindow() Config
- type Game
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func DefaultConfig ¶
func DefaultConfig() Config
func (Config) ShowCursor ¶
func (Config) WithFullScreen ¶
func (Config) WithHiddenCursor ¶
func (Config) WithVisibleCursor ¶
func (Config) WithWindow ¶
type Game ¶
type Game interface { // Draw the game's state onto the target. Draw(tgt draw.Target, src input.Source) // Update the game's state Update(src input.Source, dt time.Duration) (Game, error) }
A Game that can be run.
Draw and Update will never be called concurrently. Besides that no ordering is guaranteed.
This package only defines the interface. Runner packages might use different underlying libraries.
Click to show internal directories.
Click to hide internal directories.