bt

package
v0.0.0-...-a54a77b Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Continue = Command(iota)
	Close    = Command(iota)
	Yield    = Command(iota)
	Restart  = Command(iota)
)

Variables

View Source
var (
	Routines []Routiner = make([]Routiner, 0)
)

Functions

func Clear

func Clear()

func Run

func Run(ticks int)

Types

type Command

type Command byte

type Routine

type Routine struct {
	CurrentFunc int
	Status      Command
	Funcs       []RoutineFunc
}

func New

func New(funcs ...RoutineFunc) *Routine

func Start

func Start(funcs ...RoutineFunc) *Routine

func (*Routine) Run

func (r *Routine) Run() (Command, bool)

type RoutineFunc

type RoutineFunc func() Command

func Sequence

func Sequence(funcs ...RoutineFunc) RoutineFunc

func Sleep

func Sleep(secs float32) RoutineFunc

func SleepRand

func SleepRand(secs float32) RoutineFunc

func WaitContinue

func WaitContinue(fnc RoutineFunc, child Routiner, secTimeout float32) RoutineFunc

type Routiner

type Routiner interface {
	Run() (Command, bool)
}

Jump to

Keyboard shortcuts

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