Documentation ¶
Index ¶
- Constants
- Variables
- func ClearKeyBoardRegistry()
- func DrawEntities(background interfaces.Draw)
- func DrawGrid(screen *ebiten.Image)
- func Error(msg string)
- func GameEngineDraw(screen *ebiten.Image)
- func GetMainView() *ebiten.Image
- func PlaySound(id string)
- func UnmarshalJson(item models.JsonSerializable, path string)
- func UpdateGameEngine() error
- func Warn(msg string)
- func WriteMessage(msg string)
- func WriteStatusKeys(msg string)
- func WriteStatusMessage(msg string)
- type DiceRoller
- type DiceRollerUI
- type GameEngine
- type Panel
- type PanelVertical
- type UnitWeaponsPanel
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 GameEngineDraw ¶
func GameEngineDraw(screen *ebiten.Image)
func GetMainView ¶
func GetMainView() *ebiten.Image
func UnmarshalJson ¶
func UnmarshalJson(item models.JsonSerializable, path string)
func UpdateGameEngine ¶
func UpdateGameEngine() error
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 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.