embark

package
v0.0.0-...-47a16e8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package embark provides a Manager type to display a configuration mode to the player where they can design a squad to start a run with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	Profession(profession string) *game.ProfessionDetails
	Names() map[string][]string
	Appearance(profession string, sex game.CharacterSex, hair string, skin string) *game.Appearance
	HairVariations() []string
	SkinVariations() []string
	PedestalAppearances(sinister bool) []int
}

Archive is what is required by embark of any archive data provider.

type CharacterSheetData

type CharacterSheetData struct {
	Name          string
	Profession    string
	Lvl           int
	Sex           string
	Background    string
	BackgroundX   int
	BackgroundY   int
	Portrait      string
	PortraitX     int
	PortraitY     int
	OverlayFrame  string
	OverlayFrameX int
	OverlayFrameY int
	Prep          int
	AP            int
	Strlvl        string
	Agilvl        string
	Intlvl        string
	Vitlvl        string
	Masteries     []string
	HandleCancel  func(string)
	HandleAction  func(string)
	ActionButton  string
}

func AsCharacterSheetData

func AsCharacterSheetData(char *game.Character, equip *item.Equipment, prof *game.ProfessionDetails, app *game.Appearance) CharacterSheetData

type Embarked

type Embarked struct {
}

Embarked is the event that occurs when the embark Manager has finished fading out.

func (Embarked) Type

func (Embarked) Type() event.Type

Type of the Event.

type Embarking

type Embarking struct {
	Value bool
}

Embarking is a Component that stores whether a Character is embarking to go on an adventure, or will stay home in the village.

func (*Embarking) Type

func (*Embarking) Type() string

Type of this Component.

type Feature

type Feature struct {
	Sprite game.Sprite

	// Coverage is a series of contiguous hexes that this feature also expands
	// over. One feature might not fit on a hex, so the way to describe which
	// other hexes it also requires to fit is by traversing the geometry
	// directions, and collecting the hexes traversed.
	Coverage []geom.DirectionType

	// PathConnect is the series of steps required to get from the anchor point
	// of this Feature (the lowest Y coordinate), to the hex that connects to a
	// roadway.
	PathConnect []geom.DirectionType
}

Feature is something that appears on the embark screen, like a house or other doodad.

func (*Feature) Occupies

func (f *Feature) Occupies(origin geom.Key) []geom.Key

Occupies calculates the geom.keys that this feature would take if it was placed at a given origin.

func (*Feature) StartOfPathFor

func (f *Feature) StartOfPathFor(origin geom.Key) geom.Key

StartOfPathFor figures out which hex should connect to a pathway for thie feature when it is placed at the passed origin.

type Manager

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

Manager holds state and provides methods to control that state for an embark screen. This screen allows the player to configure the Characters they will start their run with.

func NewManager

func NewManager(mgr *ecs.World, bus *event.Bus, archive Archive) *Manager

NewManager creates a new Manager in a default state. You should call Begin to start the Manager.

func (*Manager) Begin

func (em *Manager) Begin()

Begin an embark Manager, setting up Entities required to display and interact with the embark screen.

func (*Manager) End

func (em *Manager) End()

End an embark Manager, resetting it to a default state.

type SquadSelected

type SquadSelected struct {
}

SquadSelected occurs when the player has finished configuring their squad and is ready to embark on a new run.

func (SquadSelected) Type

func (SquadSelected) Type() event.Type

Type of the Event.

Jump to

Keyboard shortcuts

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