Documentation ¶
Index ¶
- func CommandSync(ss []*Sprite, cmds [][]string, sync_tag string)
- type Data
- type FrameRect
- type Manager
- type Sprite
- func (s *Sprite) Anim() string
- func (s *Sprite) AnimState() string
- func (s *Sprite) Bind() (x, y, x2, y2 float64)
- func (s *Sprite) Command(cmd string)
- func (s *Sprite) CommandN(cmds []string)
- func (s *Sprite) Dims() (dx, dy int)
- func (s *Sprite) Facing() int
- func (s *Sprite) GetSpriteState() SpriteState
- func (s *Sprite) Idle() bool
- func (s *Sprite) NumPendingCmds() int
- func (s *Sprite) SetSpriteState(state SpriteState) error
- func (s *Sprite) SetTriggerFunc(tf TriggerFunc)
- func (s *Sprite) State() string
- func (s *Sprite) StateFacing() int
- func (s *Sprite) Think(dt int64)
- func (s *Sprite) Wait(states []string)
- type SpriteState
- type TriggerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandSync ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func MakeManager ¶
func MakeManager() *Manager
type Sprite ¶
type Sprite struct {
// contains filtered or unexported fields
}
func LoadSprite ¶
func (*Sprite) GetSpriteState ¶
func (s *Sprite) GetSpriteState() SpriteState
func (*Sprite) NumPendingCmds ¶
func (*Sprite) SetSpriteState ¶
func (s *Sprite) SetSpriteState(state SpriteState) error
func (*Sprite) SetTriggerFunc ¶
func (s *Sprite) SetTriggerFunc(tf TriggerFunc)
func (*Sprite) StateFacing ¶
type SpriteState ¶
type SpriteState struct {
// contains filtered or unexported fields
}
An opaque object that contains everything necessary to start a sprite from a particular point. Useful when rewinding something, for example. Gobbable.
func (*SpriteState) GobDecode ¶
func (ss *SpriteState) GobDecode(data []byte) error
func (*SpriteState) GobEncode ¶
func (ss *SpriteState) GobEncode() ([]byte, error)
type TriggerFunc ¶
A trigger func is a function that is called when a certain frame of animation is reached. It is specified by line like "func:foo bar wingding" in the animation graph, and such a line will mean that when that frame is reached by any sprite with that graph the TriggerFunc foo will be called with two parameters, the Sprite that reached that frame, and the text "foo bar wingding".
Click to show internal directories.
Click to hide internal directories.