gameview

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZoneCard          = "card_"
	ZoneEnemy         = "enemy_"
	ZoneEndTurn       = "end_turn"
	ZonePlayerInspect = "player_inspect"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DamageAnimationFrame

type DamageAnimationFrame string

type DamageAnimationModel

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

func NewDamageAnimationModel

func NewDamageAnimationModel(width int, height int, startHp int, sources []game.Actor, sourcesEnemies []*game.Enemy, damages []game.StateEventDamageData) DamageAnimationModel

func (DamageAnimationModel) Init

func (m DamageAnimationModel) Init() tea.Cmd

func (DamageAnimationModel) SetSize

func (m DamageAnimationModel) SetSize(width int, height int) DamageAnimationModel

func (DamageAnimationModel) Update

func (m DamageAnimationModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (DamageAnimationModel) View

func (m DamageAnimationModel) View() string

type DeathAnimationFrame

type DeathAnimationFrame string

type DeathAnimationModel

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

func NewDeathAnimationModel

func NewDeathAnimationModel(width int, height int, target game.Actor, targetEnemy *game.Enemy, death game.StateEventDeathData) DeathAnimationModel

func (DeathAnimationModel) Init

func (m DeathAnimationModel) Init() tea.Cmd

func (DeathAnimationModel) SetSize

func (m DeathAnimationModel) SetSize(width int, height int) DeathAnimationModel

func (DeathAnimationModel) Update

func (m DeathAnimationModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (DeathAnimationModel) View

func (m DeathAnimationModel) View() string

type EndTurnAnimationFrame added in v0.0.5

type EndTurnAnimationFrame string

type EndTurnAnimationModel added in v0.0.5

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

func NewEndTurnAnimationModel added in v0.0.5

func NewEndTurnAnimationModel(width int, height int, turn int) EndTurnAnimationModel

func (EndTurnAnimationModel) Init added in v0.0.5

func (m EndTurnAnimationModel) Init() tea.Cmd

func (EndTurnAnimationModel) SetSize added in v0.0.5

func (m EndTurnAnimationModel) SetSize(width int, height int) EndTurnAnimationModel

func (EndTurnAnimationModel) Update added in v0.0.5

func (m EndTurnAnimationModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (EndTurnAnimationModel) View added in v0.0.5

func (m EndTurnAnimationModel) View() string

type Model

type Model struct {
	ui.MenuBase

	Session           *game.Session
	Start             game.StateCheckpointMarker
	BeforeStateSwitch game.StateCheckpointMarker
	// contains filtered or unexported fields
}

func New

func New(parent tea.Model, zones *zone.Manager, session *game.Session) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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