bot

package
v0.0.0-...-350adb2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	L *lua.LState
	sync.Mutex
	// contains filtered or unexported fields
}

func NewWithBehaviorTree

func NewWithBehaviorTree(path string, bt *behavior.Tree, tmpl string) *Bot

func (*Bot) Close

func (b *Bot) Close()

func (*Bot) GetCurNodeID

func (b *Bot) GetCurNodeID() string

func (*Bot) GetMetadata

func (b *Bot) GetMetadata() (string, error)

func (*Bot) GetPrevNodeID

func (b *Bot) GetPrevNodeID() string

func (*Bot) GetReport

func (b *Bot) GetReport() []script.Report

func (*Bot) ID

func (b *Bot) ID() string

func (*Bot) Name

func (b *Bot) Name() string

func (*Bot) Run

func (b *Bot) Run(doneCh chan string, errch chan ErrInfo)

func (*Bot) RunStep

func (b *Bot) RunStep() State

type ErrInfo

type ErrInfo struct {
	ID  string
	Err error
}

type State

type State int32
const (
	SEnd State = 1 + iota
	SBreak
	SSucc
)

系统内部错误

Jump to

Keyboard shortcuts

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