Documentation ¶
Index ¶
Constants ¶
const ( CommandUnknown command = iota CommandQuit CommandMoveN CommandMoveNE CommandMoveE CommandMoveSE CommandMoveS CommandMoveSW CommandMoveW CommandMoveNW CommandZoomOut CommandZoomIn CommandScrollLeft CommandScrollRight CommandScrollUp CommandScrollDown CommandNextTimeStep CommandInteract CommandSelect1 CommandSelect2 CommandSelect3 CommandSelect4 CommandSelect5 CommandSelect6 CommandSelect7 CommandSelect8 CommandSelect9 CommandSelect0 CommandAltSelect1 CommandAltSelect2 CommandAltSelect3 CommandAltSelect4 CommandAltSelect5 CommandAltSelect6 CommandAltSelect7 CommandAltSelect8 CommandAltSelect9 CommandAltSelect0 CommandDebugReload )
List of commandTypes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game is the main struct of the game
func (*Game) GameLoop ¶
func (g *Game) GameLoop()
GameLoop is a blocking function actually running the game.
func (*Game) NotifyCommand ¶
func (g *Game) NotifyCommand(command command)
NotifyCommand will be called from commandManager when a registered command is received.
func (*Game) NotifyMouseCommand ¶
NotifyMouseCommand will be called from commandManager when a mouse event is received.
func (*Game) Occupied ¶
Occupied returns true if the given tile is occupied by a blocking entity and if the tile is currently visible.
type MainMenu ¶
type MainMenu struct {
// contains filtered or unexported fields
}
MainMenu represents the main menu of the game
func (*MainMenu) MoveCursor ¶
MoveCursor moves the cursor of the currently selected item.
func (*MainMenu) Render ¶
func (g *MainMenu) Render(console *console.MatrixConsole, gameInProgress bool)
Render the main menu on the provided console
func (*MainMenu) Select ¶
func (g *MainMenu) Select() MainMenuActionType
Select selects the currently activated cursor element.
type MainMenuActionType ¶
type MainMenuActionType int
MainMenuActionType holds the type of result.
const ( MainMenuActionUnknown MainMenuActionType = iota MainMenuActionStartGame MainMenuActionLoadGame MainMenuActionOptions MainMenuActionQuit )
List of MainMenuActionTypes.