engine

package
v0.0.0-...-2995887 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const SampleRate = 48000

Variables

View Source
var ColWidths = map[int]int{
	0: 20,
	1: 150,
	2: 30,
	3: 30,
	4: 60,
	5: 30,
	6: 30,
	7: 30,
	8: 30,
}
View Source
var KeyBoardRegistry = make(map[ebiten.Key]func())
View Source
var ModelPics = make(map[string]*ebiten.Image)

Functions

func ClearKeyBoardRegistry

func ClearKeyBoardRegistry()

func DrawEntities

func DrawEntities(background interfaces.Draw)

func DrawGrid

func DrawGrid(screen *ebiten.Image)

func Error

func Error(msg string)

func GameEngineDraw

func GameEngineDraw(screen *ebiten.Image)

func GetMainView

func GetMainView() *ebiten.Image

func PlaySound

func PlaySound(id string)

func UnmarshalJson

func UnmarshalJson(item models.JsonSerializable, path string)

func UpdateGameEngine

func UpdateGameEngine() error

func Warn

func Warn(msg string)

func WriteMessage

func WriteMessage(msg string)

func WriteStatusKeys

func WriteStatusKeys(msg string)

func WriteStatusMessage

func WriteStatusMessage(msg string)

Types

type DiceRoller

type DiceRoller struct {
	DieImage map[int]*ebiten.Image
	Dice     []int
	// contains filtered or unexported fields
}

func (DiceRoller) GetUIPanel

func (re DiceRoller) GetUIPanel(dice []int) *ebiten.Image

func (DiceRoller) PlaySound

func (re DiceRoller) PlaySound()

func (DiceRoller) Roll

func (re DiceRoller) Roll(msg string, diceRollType interfaces.DiceRollType, onRoll func(die int) int) (int, []int)

rolls the indicated dice count and returns how many are equal to or greater then the target. Also returns each die result.

type DiceRollerUI

type DiceRollerUI struct {
}

type GameEngine

type GameEngine struct {
}

func (GameEngine) Draw

func (re GameEngine) Draw(screen *ebiten.Image)

func (GameEngine) Layout

func (re GameEngine) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (GameEngine) Update

func (re GameEngine) Update() error

type Panel

type Panel struct {
	Img *ebiten.Image
}

func NewPanel

func NewPanel(x, y int) *Panel

type PanelVertical

type PanelVertical struct {
	Img *ebiten.Image
}

func NewPanelVertical

func NewPanelVertical(x int, y int) *PanelVertical

type UnitWeaponsPanel

type UnitWeaponsPanel struct {
	WeaponPanel *PanelVertical
	Unit        *models.Unit
}

func NewUnitWeaponsPanel

func NewUnitWeaponsPanel(unit *models.Unit) *UnitWeaponsPanel

func (UnitWeaponsPanel) GetUnitWeaponsPanel

func (re UnitWeaponsPanel) GetUnitWeaponsPanel() *ebiten.Image

Jump to

Keyboard shortcuts

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