sprite

package
v0.0.0-...-fcffdc5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flick

type Flick struct {
	Icon         string          `json:"icon"`
	Frames       []icon.SourceXY `json:"frames"`
	SourceWidth  uint            `json:"sw"`
	SourceHeight uint            `json:"sh"`
	UID          uint64          `json:"uid"`
}

type GameSprite

type GameSprite struct {
	Icon         string          `json:"icon"`
	Frames       []icon.SourceXY `json:"frames"`
	SourceWidth  uint            `json:"sw"`
	SourceHeight uint            `json:"sh"`
	X            uint            `json:"x"`
	Y            uint            `json:"y"`
	Width        uint            `json:"w"`
	Height       uint            `json:"h"`
	Name         string          `json:"name"`
	Verbs        []string        `json:"verbs"`
	UID          uint64          `json:"uid"`
}

func (GameSprite) Equal

func (s GameSprite) Equal(o GameSprite) bool

type Sound

type Sound struct {
	File    string `json:"file"`
	Repeat  bool   `json:"repeat"`
	Wait    bool   `json:"wait"`
	Channel uint   `json:"channel"`
	Volume  uint   `json:"volume"`
}

func (Sound) FixMID

func (s Sound) FixMID() Sound

func (Sound) Invoke

func (s Sound) Invoke(usr *types.Datum, name string, parameters ...types.Value) types.Value

func (Sound) SetVar

func (s Sound) SetVar(name string, value types.Value)

func (Sound) String

func (s Sound) String() string

func (Sound) Var

func (s Sound) Var(name string) types.Value

type SpriteView

type SpriteView struct {
	WindowTitle    string       `json:"windowtitle"`
	ViewPortWidth  uint         `json:"viewportwidth"`
	ViewPortHeight uint         `json:"viewportheight"`
	Sprites        []GameSprite `json:"sprites"`
	Stats          StatDisplay  `json:"stats"`
	Verbs          []string     `json:"verbs"`
}

func (SpriteView) Equal

func (a SpriteView) Equal(b SpriteView) bool

type StatDisplay

type StatDisplay struct {
	Panels map[string]StatPanel `json:"panels"`
}

func (StatDisplay) Equal

func (d StatDisplay) Equal(o StatDisplay) bool

type StatEntry

type StatEntry struct {
	Label        string          `json:"label"`
	Icon         string          `json:"icon"`
	Frames       []icon.SourceXY `json:"frames"`
	SourceWidth  uint            `json:"sw"`
	SourceHeight uint            `json:"sh"`
	Name         string          `json:"name"`
	Suffix       string          `json:"suffix"`
	Verbs        []string        `json:"verbs"`
	UID          uint64          `json:"uid"`
}

func (StatEntry) Equal

func (s StatEntry) Equal(o StatEntry) bool

type StatPanel

type StatPanel struct {
	Entries []StatEntry `json:"entries"`
}

func (*StatPanel) Add

func (p *StatPanel) Add(entry StatEntry)

func (StatPanel) Equal

func (p StatPanel) Equal(o StatPanel) bool

type ViewUpdate

type ViewUpdate struct {
	NewState  *SpriteView `json:"newstate"`
	TextLines []string    `json:"textlines"`
	Sounds    []Sound     `json:"sounds"`
	Flicks    []Flick     `json:"flicks"`
}

Jump to

Keyboard shortcuts

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