gameview

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZoneCard        = "card_"
	ZoneEnemy       = "enemy_"
	ZoneEventChoice = "event_choice_"
	ZoneEndTurn     = "end_turn"
)

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 Model

type Model struct {
	ui.MenuBase

	Session *game.Session
	Start   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