Versions in this module Expand all Collapse all v1 v1.1.0 Jan 11, 2024 Changes in this version + const Active + const AxisLeftX + const AxisLeftY + const AxisRightX + const AxisRightY + const ButtonA + const ButtonB + const ButtonBack + const ButtonBumperLeft + const ButtonBumperRight + const ButtonStart + const ButtonTriggerLeft + const ButtonTriggerRight + const ButtonX + const ButtonY + const Inactive + const KilledEnemies + var GamepadDefinitions = []GamepadDefinition + var Volume float64 = 1.0 + func AddGamepadDefinition(g GamepadDefinition) + func DrawArc(screen *ebiten.Image, posX, posY float64, radius float64, start, end float64, ...) + func DrawTextOutline(text *etxt.Renderer, screen *ebiten.Image, str string, x, y int, scale int) + func GetAxis(gamemap string, id int, which int) float64 + func GetBestGamemap(id int) string + func GetButton(gamemap string, id int, which int) bool + func GetFunctionalGamepads() (c []int) + func ReadClipboard() string + func WriteClipboard(text string) + type ActorSpawn struct + BulletGroups []*BulletGroup + ID string + Interactive *Interactive + Spawn [3]int + Sprite string + Type string + type Bullet struct + AccelAccel *float64 + Acceleration *float64 + AimDelay *int + AimTime *int + AngularVelocity *float64 + BulletType *string + Color *[]int + Damage *int + MaxSpeed *float64 + MinSpeed *float64 + Radius *int + Speed *float64 + type BulletGroup struct + Alias *string + Angle *string + Bullet *Bullet + BulletCount *int + FixedAngle *int + LastSpawnedAt *int + LoopCount *int + SpawnRate *int + func (m *BulletGroup) UnmarshalYAML(unmarshal func(interface{}) error) error + type ButtonItem struct + Callback func() bool + Text string + X float64 + Y float64 + func (t *ButtonItem) Activate() bool + func (t *ButtonItem) CheckState(x, y float64) bool + func (t *ButtonItem) Draw(ctx states.DrawContext) + func (t *ButtonItem) Hidden() bool + func (t *ButtonItem) Hovered() bool + func (t *ButtonItem) SetHidden(h bool) + type Cell struct + Type rune + type ConditionDef struct + Args []string + Type ConditionType + type ConditionType string + type Darkness struct + Duration time.Duration + Fade bool + Fin bool + func (d *Darkness) Done() bool + func (d *Darkness) ID() string + func (d *Darkness) Process(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + type Enemy struct + AlwaysShoot bool + Behavior string + Bullets []*BulletGroup + Framerate int + Friendly bool + Health int + NextPhase string + SpawnOnDeath []string + Speed int + Sprite string + Wander bool + func (e *Enemy) UnmarshalYAML(unmarshal func(interface{}) error) error + type Fade struct + Alpha float64 + ApplyToImage bool + Duration time.Duration + Out bool + func (f *Fade) Done() bool + func (f *Fade) ID() string + func (f *Fade) Process(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + type GPT struct + IsInitKey bool + Key string + MaxTokens int + Model string + Style string + SystemPrompt string + func InitGPT(fs multipath.FS) *GPT + func (g *GPT) CheckKey() bool + func (g *GPT) Fetch(method, url string, requestBody *[]byte) ([]byte, error) + func (g *GPT) GetKey() string + func (g *GPT) GetLocale(baseLocale *Locale, locale string) (*Locale, error) + func (g *GPT) SetKey(key string) + func (gpt *GPT) GetResponse(inputLocale *Locale, locale string) (Locale, error) + type GPTRequestBody struct + Messages []MessageBody + Model string + type GPTResponse struct + Choices []struct{ ... } + type GamepadDefinition struct + Map GamepadMap + Match []string + Name string + type GamepadMap map[int]int + func GetGamemap(name string) GamepadMap + func (g *GamepadMap) UnmarshalYAML(unmarshal func(interface{}) error) error + type Hover struct + Intensity float64 + Rate float64 + func (h *Hover) Done() bool + func (h *Hover) ID() string + func (h *Hover) Process(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + type InputItem struct + Callback func() bool + Placeholder string + Text string + Width float64 + X float64 + Y float64 + func (t *InputItem) Activate() bool + func (t *InputItem) CheckState(x, y float64) bool + func (t *InputItem) Deactivate() + func (t *InputItem) Draw(ctx states.DrawContext) + func (t *InputItem) Hidden() bool + func (t *InputItem) Hovered() bool + func (t *InputItem) IsActive() bool + func (t *InputItem) SetHidden(h bool) + func (t *InputItem) Update() + type Interactive struct + Active bool + AddVFX []string + Collidable bool + Conditions []*ConditionDef + Degrade bool + Health int + Linked []string + Map *string + NPC bool + RemoveVFX []string + Reversable bool + Text string + Touchable bool + type Layer struct + Cells [][]Cell + type Locale map[string]string + func (l *Locale) Get(key string) string + type Map struct + Actors []ActorSpawn + Conditions []*ConditionDef + End bool + Height int + Hints []string + Layers []Layer + Music string + RuneMap map[string]RuneDef + SourceLayers []string + Title string + VFX []VFXDef + Width int + func (m *Map) UnmarshalYAML(unmarshal func(interface{}) error) error + type MenuItem interface + Activate func() bool + CheckState func(x, y float64) bool + Draw func(ctx states.DrawContext) + Hidden func() bool + Hovered func() bool + SetHidden func(bool) + type MessageBody struct + Content string + Role string + type RuneDef struct + BlockMove bool + BlockView bool + Floor bool + ID string + Isometric bool + Sprite string + Wall bool + type Song struct + func NewSong(rs io.ReadSeeker) (*Song, error) + func (s *Song) Stream() *vorbis.Stream + type Sound struct + func NewSound(data []byte) (*Sound, error) + func (s *Sound) Play(v float64) *audio.Player + type Sprite struct + Centered bool + Flipped bool + Framerate int + Hidden bool + Interpolate bool + Loop bool + Options ebiten.DrawImageOptions + Reverse bool + Scale float64 + VFX VFXList + X float64 + Y float64 + func NewAnimatedSprite(images []*ebiten.Image) *Sprite + func NewAnimatedSpriteFromName(resources states.Resource, name string) *Sprite + func NewSprite(image *ebiten.Image) *Sprite + func (s *Sprite) AddImage(image *ebiten.Image) + func (s *Sprite) Draw(ctx states.DrawContext) + func (s *Sprite) DrawWithOptions(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + func (s *Sprite) Frame() int + func (s *Sprite) Height() float64 + func (s *Sprite) Hit(x, y float64) bool + func (s *Sprite) Image() *ebiten.Image + func (s *Sprite) Images() []*ebiten.Image + func (s *Sprite) Reset() + func (s *Sprite) SetFrame(frame int) + func (s *Sprite) SetImage(image *ebiten.Image) + func (s *Sprite) SetXY(x, y float64) + func (s *Sprite) Update() + func (s *Sprite) Width() float64 + type SpriteItem struct + Callback func() bool + Sprite *Sprite + X float64 + Y float64 + func (s *SpriteItem) Activate() bool + func (s *SpriteItem) CheckState(x, y float64) bool + func (s *SpriteItem) Draw(ctx states.DrawContext) + func (s *SpriteItem) Hidden() bool + func (s *SpriteItem) Hovered() bool + func (s *SpriteItem) SetHidden(h bool) + type Sprites []*Sprite + type Text struct + Color color.NRGBA + Delay time.Duration + HoldDuration time.Duration + InDuration time.Duration + OutDuration time.Duration + Outline bool + OutlineColor color.NRGBA + Scale float64 + Text string + X float64 + Y float64 + func (t *Text) ID() string + func (v *Text) Done() bool + func (v *Text) Process(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + type TextItem struct + Callback func() bool + SelfRefCallback *func(*TextItem) bool + Text string + Underline bool + X float64 + Y float64 + func (t *TextItem) Activate() bool + func (t *TextItem) CheckState(x, y float64) bool + func (t *TextItem) Draw(ctx states.DrawContext) + func (t *TextItem) Hidden() bool + func (t *TextItem) Hovered() bool + func (t *TextItem) SetHidden(h bool) + type VFX interface + Done func() bool + ID func() string + Process func(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + type VFXDef struct + Duration time.Duration + Type string + type VFXList struct + func (v *VFXList) Add(vfx VFX) + func (v *VFXList) Empty() bool + func (v *VFXList) Items() []VFX + func (v *VFXList) Process(ctx states.DrawContext, opts *ebiten.DrawImageOptions) + func (v *VFXList) RemoveByID(s string) + func (v *VFXList) SetMode(mode VFXListMode) + type VFXListMode int + const Parallel + const Sequential