core

package
v0.0.0-...-5f9da39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys(c *basegame.Character) error

Types

type Button

type Button struct {
	OnClick func()
	Color   color.RGBA

	Sprite  string
	DrawHan FXDHandler
	// contains filtered or unexported fields
}

type Dist_map

type Dist_map struct {
	Map      [][]Tile
	District *basegame.District
}

func RenderMap

func RenderMap(screen *ebiten.Image, mapDrawer MapDrawer, srcfile string) (error, *ebiten.Image, *Dist_map)

create the file reader, then the render function/method/interface that translates the characters into tile files to be rendered by ebitenutil.NewImageFromFile

type FXDHandler

type FXDHandler interface {
	furex.DrawHandler
}

type FXHandlerImpl

type FXHandlerImpl struct{}

func (FXHandlerImpl) HandleDraw

func (f FXHandlerImpl) HandleDraw(screen *ebiten.Image, frame image.Rectangle)

type Game

type Game struct {

	// must implement ebiten.Game interface
	ebiten.Game
	UI GameUI
	// contains filtered or unexported fields
}

func (Game) Close

func (g Game) Close()

func (Game) Draw

func (g Game) Draw(screen *ebiten.Image)

func (*Game) IsRunning

func (g *Game) IsRunning() bool

func (Game) Layout

func (g Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (Game) Update

func (g Game) Update() error

type GameHandler

type GameHandler struct {
	// contains filtered or unexported fields
}

GameHandler handles the game state

func NewGameHandler

func NewGameHandler(log *zerolog.Logger, player *basegame.Character) *GameHandler

func (*GameHandler) DrawMenu

func (h *GameHandler) DrawMenu(screen *ebiten.Image)

func (*GameHandler) NewGame

func (h *GameHandler) NewGame(c *basegame.Character)

type GameUI

type GameUI struct {
	NewGBtn     *furex.View
	LoadSaveBtn *furex.View
	DonateBtn   *furex.View
	IssuesBtn   *furex.View
	QuitBtn     *furex.View
	NewGameImg  *furex.View
}

func (*GameUI) DrawMenu

func (gu *GameUI) DrawMenu(ebiten.Image)

func (*GameUI) NewGameBtn

func (gu *GameUI) NewGameBtn() (*furex.View, error)

type MapDrawer

type MapDrawer interface {
	Draw(screen *ebiten.Image) error
}

type Tile

type Tile rune

type UI

type UI interface {
	NewGameBtn() (*furex.View, error)
	LoadSaveBtn() (*furex.View, error)
	DonateBtn() (*furex.View, error)
	IssuesBtn() (*furex.View, error)
	QuitBtn() (*furex.View, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL