Documentation ¶
Index ¶
- Constants
- func ItemBaselineY(i, n int) int
- type Controller
- func (c *Controller) ActivateSound(err error) error
- func (c *Controller) Draw(screen *ebiten.Image)
- func (c *Controller) DrawWorld(screen *ebiten.Image)
- func (c *Controller) InitGame(f resetFlag) error
- func (c *Controller) MoveSound(err error) error
- func (c *Controller) PaletteChanged() error
- func (c *Controller) QueryMouseItem(item interface{}, count int) Direction
- func (c *Controller) QuitGame() error
- func (c *Controller) SaveConfigAndSwitchToScreen(screen MenuScreen) error
- func (c *Controller) SwitchSaveState(state int) error
- func (c *Controller) SwitchToCheckpoint(cp string) error
- func (c *Controller) SwitchToGame() error
- func (c *Controller) SwitchToScreen(screen MenuScreen) error
- func (c *Controller) Update() error
- func (c *Controller) UpdateWorld() error
- type CreditsScreen
- type Direction
- type LicensesScreen
- type MainScreen
- type MainScreenItem
- type MapScreen
- type MenuScreen
- type ResetScreen
- type ResetScreenItem
- type SaveStateScreen
- type SaveStateScreenItem
- type SettingsScreen
- type SettingsScreenItem
Constants ¶
View Source
const ( Play = iota Settings Credits Quit MainCount )
View Source
const ( ResetNothing = iota ResetConfig ResetGame BackToMain ResetCount )
View Source
const ( SaveStateA = iota SaveState4 SaveStateX SaveStateY SaveExit SaveStateCount )
View Source
const ( Fullscreen = iota Graphics Quality Volume SaveState Reset Back SettingsCount )
View Source
const CenterX = engine.GameWidth / 2
View Source
const HeaderY = engine.GameHeight / 4
Variables ¶
This section is empty.
Functions ¶
func ItemBaselineY ¶ added in v1.1.112
Types ¶
type Controller ¶
type Controller struct { World engine.World Screen MenuScreen // contains filtered or unexported fields }
func (*Controller) ActivateSound ¶
func (c *Controller) ActivateSound(err error) error
ActivateSound plays the sound effect to activate something.
func (*Controller) Draw ¶
func (c *Controller) Draw(screen *ebiten.Image)
func (*Controller) DrawWorld ¶
func (c *Controller) DrawWorld(screen *ebiten.Image)
func (*Controller) InitGame ¶
func (c *Controller) InitGame(f resetFlag) error
InitGame is called by menu screens to load/reset the game.
func (*Controller) MoveSound ¶
func (c *Controller) MoveSound(err error) error
MoveSound plays the sound effect to activate something.
func (*Controller) PaletteChanged ¶ added in v1.2.141
func (c *Controller) PaletteChanged() error
func (*Controller) QueryMouseItem ¶ added in v1.1.112
func (c *Controller) QueryMouseItem(item interface{}, count int) Direction
func (*Controller) QuitGame ¶
func (c *Controller) QuitGame() error
QuitGame is called by menu screens to end the game.
func (*Controller) SaveConfigAndSwitchToScreen ¶
func (c *Controller) SaveConfigAndSwitchToScreen(screen MenuScreen) error
SaveConfigAndSwitchToScreen is called by menu screens to go to a different menu screen.
func (*Controller) SwitchSaveState ¶
func (c *Controller) SwitchSaveState(state int) error
SwitchSaveState switches to a given save state.
func (*Controller) SwitchToCheckpoint ¶
func (c *Controller) SwitchToCheckpoint(cp string) error
SwitchToCheckpoint switches to a specific checkpoint.
func (*Controller) SwitchToGame ¶
func (c *Controller) SwitchToGame() error
SwitchToGame switches to the game without teleporting.
func (*Controller) SwitchToScreen ¶
func (c *Controller) SwitchToScreen(screen MenuScreen) error
SwitchToScreen is called by menu screens to go to a different menu screen.
func (*Controller) Update ¶
func (c *Controller) Update() error
func (*Controller) UpdateWorld ¶
func (c *Controller) UpdateWorld() error
type CreditsScreen ¶
type CreditsScreen struct { // Must be set when creating. Fancy bool // With music, and constant speed - no scrolling. No exiting. Background image not needed - we use last game screen. Controller *Controller Lines []string // Actual lines to display. Frame int // Subpixel accumulator. ScrollPos int // Current scroll position. Exits int // How often exit was pressed. Need to press 7 times to leave fancy credits. }
func (*CreditsScreen) Draw ¶
func (s *CreditsScreen) Draw(screen *ebiten.Image)
func (*CreditsScreen) Init ¶
func (s *CreditsScreen) Init(m *Controller) error
func (*CreditsScreen) Update ¶
func (s *CreditsScreen) Update() error
type LicensesScreen ¶ added in v1.2.217
type LicensesScreen struct { Controller *Controller Frame int // Subpixel accumulator. ScrollPos int // Current scroll position. }
func (*LicensesScreen) Draw ¶ added in v1.2.217
func (s *LicensesScreen) Draw(screen *ebiten.Image)
func (*LicensesScreen) Init ¶ added in v1.2.217
func (s *LicensesScreen) Init(m *Controller) error
func (*LicensesScreen) Update ¶ added in v1.2.217
func (s *LicensesScreen) Update() error
type MainScreen ¶
type MainScreen struct { Controller *Controller Item MainScreenItem }
func (*MainScreen) Draw ¶
func (s *MainScreen) Draw(screen *ebiten.Image)
func (*MainScreen) Init ¶
func (s *MainScreen) Init(m *Controller) error
func (*MainScreen) Update ¶
func (s *MainScreen) Update() error
type MainScreenItem ¶
type MainScreenItem int
type MapScreen ¶
type MapScreen struct { Controller *Controller Level *level.Level FirstCP string CurrentCP string SortedLocs []string SortedEdges map[string][]level.CheckpointEdge CPPos map[string]m.Pos MapRect m.Rect WalkFrame int // contains filtered or unexported fields }
func (*MapScreen) Init ¶
func (s *MapScreen) Init(c *Controller) error
type MenuScreen ¶
type MenuScreen interface { Init(m *Controller) error Update() error Draw(screen *ebiten.Image) }
type ResetScreen ¶
type ResetScreen struct { Controller *Controller Item ResetScreenItem ResetFrame int WaitForKeyReleaseThenReset bool }
func (*ResetScreen) Draw ¶
func (s *ResetScreen) Draw(screen *ebiten.Image)
func (*ResetScreen) Init ¶
func (s *ResetScreen) Init(m *Controller) error
func (*ResetScreen) Update ¶
func (s *ResetScreen) Update() error
type ResetScreenItem ¶
type ResetScreenItem int
type SaveStateScreen ¶
type SaveStateScreen struct { Controller *Controller Item SaveStateScreenItem Text [4]string }
func (*SaveStateScreen) Draw ¶
func (s *SaveStateScreen) Draw(screen *ebiten.Image)
func (*SaveStateScreen) Init ¶
func (s *SaveStateScreen) Init(m *Controller) error
func (*SaveStateScreen) Update ¶
func (s *SaveStateScreen) Update() error
type SaveStateScreenItem ¶
type SaveStateScreenItem int
type SettingsScreen ¶
type SettingsScreen struct { Controller *Controller Item SettingsScreenItem CurrentGraphics graphicsSetting }
func (*SettingsScreen) Draw ¶
func (s *SettingsScreen) Draw(screen *ebiten.Image)
func (*SettingsScreen) Init ¶
func (s *SettingsScreen) Init(m *Controller) error
func (*SettingsScreen) Update ¶
func (s *SettingsScreen) Update() error
type SettingsScreenItem ¶
type SettingsScreenItem int
Click to show internal directories.
Click to hide internal directories.