Documentation ¶
Index ¶
- Variables
- func GetEquipmentWithTypes(equipmentTypes []string) map[string]*EquipmentAsset
- func GetHints() []string
- func GetRandomName() string
- func LoadEquipment()
- func LoadSound(soundType string, name string) (*vorbis.Stream, error)
- type EquipmentAsset
- type Font
- type Sprite
- type Staxie
- type StaxieAnimation
- type StaxieFrame
- type StaxieSlice
- type StaxieStack
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ColorState = color.NRGBA{184, 152, 93, 200} ColorHeading = color.NRGBA{200, 140, 100, 200} ColorTitle = color.NRGBA{255, 255, 255, 200} ColorGameOver = color.NRGBA{255, 52, 33, 200} ColorSelected = color.NRGBA{152, 184, 93, 100} ColorHovered = color.NRGBA{102, 134, 43, 50} ColorRoomDescription = color.NRGBA{255, 255, 255, 200} ColorRoomCost = color.NRGBA{255, 215, 0, 200} ColorStory = color.NRGBA{182, 129, 129, 255} ColorDude = color.NRGBA{160, 79, 201, 255} ColorGold = color.NRGBA{255, 215, 0, 255} ColorBoss = color.NRGBA{255, 255, 255, 255} ColorDudeHP = color.NRGBA{200, 50, 50, 200} ColorDudeXP = color.NRGBA{255, 255, 255, 200} ColorDudeTitle = color.NRGBA{255, 255, 255, 200} ColorDudeDescription = color.NRGBA{200, 200, 200, 255} ColorDudeCost = color.NRGBA{255, 215, 0, 200} ColorDudeLevel = color.NRGBA{255, 255, 255, 200} ColorDudeStrength = color.NRGBA{200, 100, 100, 200} ColorDudeAgility = color.NRGBA{200, 200, 100, 200} ColorDudeDefense = color.NRGBA{200, 200, 200, 200} ColorDudeWisdom = color.NRGBA{100, 200, 100, 200} ColorDudeConfidence = color.NRGBA{200, 100, 200, 200} ColorDudeLuck = color.NRGBA{100, 100, 200, 200} ColorItemDescription = color.NRGBA{128, 128, 128, 200} ColorItemPerk = color.NRGBA{255, 215, 0, 200} ColorItemPerkDescription = color.NRGBA{200, 200, 200, 200} ColorItemUses = color.NRGBA{255, 255, 255, 200} ColorItemLevel = color.NRGBA{200, 200, 255, 200} )
View Source
var ( ErrStackNotFound = errors.New("stack not found") ErrAnimationNotFound = errors.New("animation not found") ErrFrameNotFound = errors.New("frame not found") ErrSliceNotFound = errors.New("slice not found") )
View Source
var FS multipath.FS
Functions ¶
func GetEquipmentWithTypes ¶
func GetEquipmentWithTypes(equipmentTypes []string) map[string]*EquipmentAsset
func GetRandomName ¶
func GetRandomName() string
func LoadEquipment ¶
func LoadEquipment()
Load all equipment listed in the 'equipment/equipmentList.txt' file
Types ¶
type EquipmentAsset ¶
type EquipmentAsset struct { BaseName string Name string `yaml:"name"` Description string `yaml:"description"` Type string `yaml:"type"` Professions []string `yaml:"professions,omitempty"` Stats map[string]int `yaml:"stats,omitempty"` Perk string `yaml:"perk,omitempty"` }
EquipmentAsset is an asset that represents an equipment. Info is stored as yaml data that represents the equipment.
func GetEquipment ¶
func GetEquipment(name string) (*EquipmentAsset, error)
type Font ¶
type Font struct { Face *text.GoTextFace LineHeight float64 }
var BodyFont Font
var DisplayFont Font
type Staxie ¶
type Staxie struct { Stacks map[string]*StaxieStack StackNames []string FrameWidth int FrameHeight int // contains filtered or unexported fields }
Staxie is the structure extracted from a Staxie PNG file.
func LoadStaxie ¶
type StaxieAnimation ¶
type StaxieAnimation struct { Name string // For convenience Frametime uint32 Frames []StaxieFrame }
func (*StaxieAnimation) GetFrame ¶
func (s *StaxieAnimation) GetFrame(index int) (*StaxieFrame, bool)
type StaxieFrame ¶
type StaxieFrame struct { Index int // ehh... why not Slices []StaxieSlice }
func (*StaxieFrame) GetSlice ¶
func (s *StaxieFrame) GetSlice(index int) (*StaxieSlice, bool)
type StaxieSlice ¶
type StaxieStack ¶
type StaxieStack struct { Name string // For convenience SliceCount int Animations map[string]StaxieAnimation }
func (*StaxieStack) GetAnimation ¶
func (s *StaxieStack) GetAnimation(name string) (StaxieAnimation, bool)
Click to show internal directories.
Click to hide internal directories.